LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-01-2013, 09:15 AM   #1
Vita
Member
 
Registered: May 2012
Distribution: Debian 6, CentOS 6
Posts: 39

Rep: Reputation: Disabled
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.

Best Regards!
 
Old 09-01-2013, 09:35 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
and what does http://yum.baseurl.org/wiki/Faq say about it?
 
Old 09-01-2013, 09:58 AM   #3
Vita
Member
 
Registered: May 2012
Distribution: Debian 6, CentOS 6
Posts: 39

Original Poster
Rep: Reputation: Disabled
I didn't find a solution on that link?

Thanks in advance!
 
Old 09-01-2013, 10:40 AM   #4
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,131

Rep: Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302
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/
 
Old 09-01-2013, 10:51 AM   #5
Vita
Member
 
Registered: May 2012
Distribution: Debian 6, CentOS 6
Posts: 39

Original Poster
Rep: Reputation: Disabled
Yes, they were not available, so I compiled that program.

I know have these versions of libraries:
Code:
libssh2-1.4.2-1.el6.x86_64
libcurl-7.19.7-35.el6.x86_64
curl-7.19.7-35.el6.x86_64
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.

Best Regards!
 
Old 09-01-2013, 10:59 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Vita View Post
I've upgraded libcurl to a newer version
And how exactly did you do that? By using a package from another distribution perhaps? Or compiling software yourself?


Quote:
Originally Posted by Vita View Post
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:
Code:
rpm --noscripts --nosignature --nocaps -Vv $(rpm -qa --qf="%{name}\n" | egrep -ie "(yum|python)") | grep -v "^\.\{8\}"
Here's how to verify which Python and related packages are from a non-CentOS vendor:
Code:
rpm -q --qf="%{name} %{vendor}\n" $(rpm -qa --qf="%{name}\n" | egrep -ie "(yum|python)")|grep -vie centos
And here's how to verify which files are not part of known packages as you compiled from source:
Code:
find /lib /usr -type f -print0 | xargs -0 -iX rpm --noscripts --nosignature --nocaps -qf 'X' |grep owned
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).
 
Old 09-01-2013, 11:12 AM   #7
Vita
Member
 
Registered: May 2012
Distribution: Debian 6, CentOS 6
Posts: 39

Original Poster
Rep: Reputation: Disabled
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?

What do you suggest?

Best Regards!
 
Old 09-01-2013, 06:33 PM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Vita View Post
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 View Post
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 View Post
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.
 
Old 09-01-2013, 09:02 PM   #9
Vita
Member
 
Registered: May 2012
Distribution: Debian 6, CentOS 6
Posts: 39

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
Sure they don't: those are diagnostic commands.



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.

Thanks in advance!
 
Old 09-04-2013, 05:56 PM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Vita View Post
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
...
Well then rip out the "--noscripts --nosignature --nocaps" parts and try those commands again. While you're at it post the last 50 or so lines of
Code:
rpm -qa --qf="%{INSTALLTIME} %{NAME}\n"|sort -nk1
Unless you compiled and installed things from source this should display the most recently installed packages by their installation time.
 
1 members found this post helpful.
Old 09-04-2013, 06:16 PM   #11
Vita
Member
 
Registered: May 2012
Distribution: Debian 6, CentOS 6
Posts: 39

Original Poster
Rep: Reputation: Disabled
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.

Here is the log of the command you supplied:
Code:
...
1368293444 yum
1368293456 net-snmp-utils
1368293460 php-mysql
1368293463 php-odbc
1368293470 php-xmlrpc
1368293473 php-ldap
1368293477 php-xml
1368293483 php-imap
1368293488 php-mbstring
1368293497 php-pear-MDB2
1368293510 sudo
1368293516 perl-Time-HiRes
1368293521 bind-libs
1368293527 grub
1368293534 authconfig
1368293544 wget
1368293553 pciutils-libs
1368293555 rpmforge-release
1368293559 xorg-x11-drv-ati-firmware
1368293562 ql2400-firmware
1368293564 setup
1368293567 ql2500-firmware
1368293574 glibc
1368293587 libgcc
1368293590 libstdc++
1377825806 libidn-devel
1377825990 yasm
1378047943 libcurl
1378050549 curl
1378092278 libcurl-devel
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:
Code:
yum-3.2.29-40.el6.centos.noarch
libssh2-1.4.2-1.el6.x86_64
libcurl-7.19.7-35.el6.x86_64
curl-7.19.7-35.el6.x86_64
Linux version and other info:
Code:
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
 
Old 09-04-2013, 06:44 PM   #12
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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.
 
Old 09-04-2013, 07:15 PM   #13
Vita
Member
 
Registered: May 2012
Distribution: Debian 6, CentOS 6
Posts: 39

Original Poster
Rep: Reputation: Disabled
I installed everything as you suggested but I needed to download libssh2 from here ftp://ftp.muug.mb.ca/mirror/centos/6...el6.x86_64.rpm because It was deleted by:
Code:
rpm -e libssh2 libcurl-devel libcurl curl
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?

Thanks in advance!
 
Old 09-04-2013, 07:29 PM   #14
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Vita View Post
Code:
/usr/lib64/libcurl.so.4: undefined symbol: libssh2_knownhost_init
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.
 
1 members found this post helpful.
Old 09-04-2013, 11:10 PM   #15
Vita
Member
 
Registered: May 2012
Distribution: Debian 6, CentOS 6
Posts: 39

Original Poster
Rep: Reputation: Disabled
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!

Best Regards!

Last edited by Vita; 09-04-2013 at 11:17 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NIC not installed anymore, KDE not installed anymore, LILO duplicate Volume ID error scottad Slackware 2 03-31-2012 12:13 AM
yum dosen't work in CentOS 5 ytd Linux - Newbie 1 10-20-2009 03:24 AM
[SOLVED] yum install cacti does not work on Centos 5.3 any suggestions? nandanm1 Red Hat 2 07-16-2009 08:00 AM
VLC yum installed from rpmforge doesn't work ? utw-mephisto Linux - Software 2 02-19-2009 05:42 AM
Installed Nvidia 5200, now TV Tuner doesn't work anymore xmrkite Linux - Hardware 1 02-20-2007 06:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration