[SOLVED] Installed cURL and yum does not work anymore on CentOS 6.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Installed cURL and yum does not work anymore on CentOS 6.
Hi,
I've upgraded libcurl to a newer version as I needed it for running some programs, today I wanted to install a package and when I tried to do yum install package i got this message:
Code:
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
/usr/lib64/libcurl.so.4: undefined symbol: libssh2_knownhost_init
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Feb 22 2013, 00:00:18)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
Even when I type yum I get this message so I guess I broken something by installing a new version of libcurl.
So I downloaded one version back and installed it via rpm but nothing happens, whenever I type yum I get that message. I tried rebooting the machine but it's the same. Is there a way to fix this somehow without reinstalling everything.
When you say you installed the original module, you don't say whether you un-installed the new one: that will be necessary. Are you sure that the programs you want to run are not available in versions suitable for CentOS? You can search for them at http://rpm.pbone.net/ http://pkgs.org/
I've removed the libcurl-7.19.7-37.el6.x86_64 via rpm and installed those written up, but the problem remains. Also I've done that with curl, thou I didn't touch the libssh2.
And how exactly did you do that? By using a package from another distribution perhaps? Or compiling software yourself?
Quote:
Originally Posted by Vita
I downloaded one version back and installed it via rpm but nothing happens, whenever I type yum I get that message. I tried rebooting the machine but it's the same. Is there a way to fix this somehow without reinstalling everything.
Rebooting is unnecessary as it doesn't change what software is installed.
Here's how to verify integrity of your current Python and related packages:
If you compiled and installed from source then the source may allow you to 'make uninstall'. Note that may leave your system in an unstable state so if any of the commands above show problems with existing Python packages you instead may proceed to using the 'rpm' command instead to downgrade packages (may require use of "--force") or even be forced to use 'rpm2cpio' and move files to their destiny to get the system working again.
The essence is that you first unfsck what you did and afterward find a way that not fscks up your system. What you should learn from all of that is that you should: 0) not introduce packages that are not part of CentOS or compatible repos and, more importantly, 1) not replace Python or related CentOS packages because the OS relies heavily on it. *Well OK, not completely, as you can certainly replace or upgrade software as long as you can live with the consequences (have backups, mostly ;-p).
Running all these 3 commands didin't help me in solving this problem. The biggest problem is that I cant roll over a backup on a remote machine as I don't have it. So I should somehow reinstall the whole yum with all dependencies via rpm.
Or my other idea is to just replace the /usr/lib64/libcurl.so.4 with one that has libssh2_knownhost_init defined. That way I could maybe trick the system somehow and be able to use yum again. If this is a good option is it good to download sources of libcurl and compile them then replace the libs?
Running all these 3 commands didin't help me in solving this problem.
Sure they don't: those are diagnostic commands.
Quote:
Originally Posted by Vita
The biggest problem is that I cant roll over a backup on a remote machine as I don't have it.
Well then now you know why you should make backups.
Quote:
Originally Posted by Vita
So I should somehow reinstall the whole yum with all dependencies via rpm.
To me it would make sense to first get the system back to a usable state. What you need to replace depends on what you corrupted. And since you didn't post output of those diagnostic commands there's no way telling what you fscked up.
Well then now you know why you should make backups.
To me it would make sense to first get the system back to a usable state. What you need to replace depends on what you corrupted. And since you didn't post output of those diagnostic commands there's no way telling what you fscked up.
When I ran first two commands I got nothing, the third one showed continuously:
Code:
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
rpm: script disabling options may only be specified during package installation and erasure
...
I can't reinstall the machine as It's not possible, I currently don't have physical access to the server and can't get it. I need to somehow fix the issue. At first I updated the cURL lib via yum to the newer version, and that broke the yum but I didn't know that until yesterday. I compiled my app from source that needed libcurl of specific version for compiling. Now I'm stuck with the system that does not have yum functioning properly.
So If anyone has an idea of how can I fix this without reinstalling the system, please suggest it so I can try it.
New version of LibCurl was installed via yum, after that I messed with the OS and tried installing previous version of libcurl via rpm as I did, but the app that was compiled from source, I guess that somehow libcurl made a problem.
I still get the error after trying the older libcurl version:
Code:
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
/usr/lib64/libcurl.so.4: undefined symbol: libssh2_knownhost_init
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Feb 22 2013, 00:00:18)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
As I mentioned in one of the previous posts I currently have this versions of software:
Linux hostname.host 2.6.32-358.6.1.el6.x86_64 #1 SMP Tue Apr 23 19:29:00 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
This is the last stuff that I installed via yum before it was broken.
Code:
Aug 30 03:18:38 Updated: libcurl-7.19.7-37.el6_4.x86_64
Aug 30 03:18:46 Updated: curl-7.19.7-37.el6_4.x86_64
Aug 30 03:23:33 Installed: libidn-devel-1.18-2.el6.x86_64
Aug 30 03:23:42 Installed: libcurl-devel-7.19.7-37.el6_4.x86_64
Aug 30 03:26:31 Installed: yasm-1.2.0-1.el6.x86_64
I guess that yum-3.2.29-40.el6.centos.noarch is not compatible with libcurl-7.19.7-35.el6.x86_64. What version should I try to install?
Thanks in advance!
Last edited by Vita; 09-04-2013 at 06:28 PM.
Reason: Added more info
Looks like you messed up by installing from source and using non-CentOS repos...
Anyway:
Code:
# First move elsewhere:
cd /tmp || exit 1
# Now download these RPM packages:
[some.centos.mirror]/6.4/updates/x86_64/Packages/curl-7.19.7-36.el6_4.x86_64.rpm
[some.centos.mirror]/6.4/updates/x86_64/Packages/libcurl-7.19.7-36.el6_4.x86_64.rpm
# Just to be safe unpack them first:
mkdir /tmp/unpack; cd /tmp/unpack || exit 1
rpm2cpio /tmp/curl-7.19.7-36.el6_4.x86_64.rpm | cpio -idmv
rpm2cpio /tmp/libcurl-7.19.7-36.el6_4.x86_64.rpm | cpio -idmv
cd /tmp || exit 1
# Now remove these (may require "--nodeps" or even that plus "--force"):
rpm -e libssh2 libcurl-devel libcurl curl
# then install the packages (prolly not but may require "--nodeps"):
rpm -i /tmp/curl-7.19.7-36.el6_4.x86_64.rpm /tmp/libcurl-7.19.7-36.el6_4.x86_64.rpm
# If anything failed post the output. If installing the packages failed move into cd /tmp/unpack and manually move the files there.
And when I type yum into the terminal I get same output:
Code:
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
/usr/lib64/libcurl.so.4: undefined symbol: libssh2_knownhost_init
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Feb 22 2013, 00:00:18)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
So I guess that didn't solve the problem. One thing crossed my mind I think that python 2.6 that is used by yum needs python-curl-7.19.0-3.2 I don't have that installed also I think that curl-7.19.0-3.2 is needed. What do you think should I try to install that curl version and that rpm?
The missing symbol isn't available in the installed version of libssh2.
Find a RPM version of libssh2 that has it or compile a libssh2 package from source.
I really didn't see at first that the problem was with libssh2 and not with the libcurl.
I managed to get yum working by removing the default libssh2 by doing this:
Code:
rpm -ev --nodeps libssh2
After that I downloaded the newest daily build of libssh2 from their official site, unpacked it, compiled it and installed it:
Code:
cd /tmp
wget http://www.libssh2.org/snapshots/libssh2-1.4.4-20130904.tar.gz
tar -zxvf libssh2-1.4.4-20130904.tar.gz
cd libssh2-1.4.4-20130904/
./configure
make
make all install
That solved the problem!
I hope someone will find this useful!
Thanks again unSpawn for your help and ideas, I also learned one big thing and that's make frequent backups or else you're going to go trough, a lot of pain to fix the mess!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.