Yum error on Centos 6.4 - centos

Yum suddenly start to give the error pasted bellow
I tried to rebuild yum, but the error remains. I re-installed krb5-libs, but the error remains
How can I repair yum without reinstating Centos?
Error:
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
/lib64/libkrb5.so.3: symbol krb5int_push_fscreatecon_for, version krb5support_0_MIT not defined in file libkrb5support.so.0 with link time reference
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, Jul 10 2013, 22:48:45)
[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

At my machine the issue was caused by a second libkrb5support.so distributed with PostgreSQL 5.2 / PSqlODBC. After commenting the library path in /etc/ld.so.conf.d/psqlODBC.conf and runing ldconfig -v, I can run yum again without any issue.
In my case, the path to the "wrong" library is /opt/PostgreSQL/9.2/lib/libkrb5support.so.0
Edgar.

I encountered this error after defining LD_LIBRARY_PATH environment variable. It was fixed by adding /lib and /lib64 to LD_LIBRARY_PATH.
export LD_LIBRARY_PATH=/lib:/lib64:....

Run the below command to test what all the libraries you have:
# ldd /lib64/libkrb5.so.3
And make sure that the module 'libkrb5support.so.0' is available under '/lib64' directory or having the soft ink to the files that is inside /lib64 directory. If its not there then this error is expected. So manually you have to link it again.
From my test system:
# locate libkrb5support.so.0
/lib64/libkrb5support.so.0
# ls -l /lib64/libkrb5support.so.0
lrwxrwxrwx. 1 root root 21 Aug 19 15:52 /lib64/libkrb5support.so.0 -> libkrb5support.so.0.1
# ls -l /lib64/libkrb5support.so.0.1
-rwxr-xr-x. 1 root root 46336 May 1 2012 /lib64/libkrb5support.so.0.1

Related

No way to update python3.10 on my linux mint mate 20.3 Una

Last night the update manager indicates there are 2 update ready. I want to apply them but at the end only one updates the 2nd one (python 3.10) does not. It was late so went to bed. This morning that update is still there but now there is some more stuff.
Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease' doesn't support architecture 'i386'
It was not exactly the same as mine related to codelite. I looked in repositories and ppa´s and found an entry for codelite and disabled it. That message was gone. But the update still did not work. This time a problem with the mirror I was using. Changed mirror and all the rest runs fine. Still updating python 3.10 no way. Other updates do pass, even python 3.8 and 3.9. Clearly the problem lies with python 3.10 and seem dependency related but I am stumped.
The deadsnakes repository is there. I removed and reinstalled it. Still same problem.
Here is a screen shoot of my terminal (same messages appear when I use synaptic):
It all turn around two dependencies that python 3.10 needs but are no longer there. But the recommended commands do nothing but return the same result.
The following packages have unmet dependencies.
python3.10 : Depends: libpython3.10-stdlib (= 3.10.4-1+focal2) but 3.10.4-1+focal1 is installed
python3.10-minimal : Depends: libpython3.10-minimal (= 3.10.4-1+focal2) but 3.10.4-1+focal1 is installed
So what is going wrong? what apart from focal1 and focal2 is different? And are they fundamentally different? Most importantly how do I solve this problem without going in circles.
Oh and before I forget. My python console in gedit stopped working at the same time as these problems started and I can't make out what the problem there is either. Suspect though they are related. e
Thank you in advance.
Here is how I solved the same issue in Ubuntu 20.04
Locate package libpython3.10-stdlib
$ apt-cache policy libpython3.10-stdlib
libpython3.10-stdlib:
Installed: 3.10.4-1+focal1
Candidate: 3.10.4-1+focal2
Version table:
3.10.4-1+focal2 500
500 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal/main amd64 Packages
*** 3.10.4-1+focal1 100
100 /var/lib/dpkg/status
$ ls -l /var/lib/dpkg/info | grep -i libpython3.10-stdlib
-rw-r--r-- 1 root root 14489 Apr 10 00:26 libpython3.10- stdlib:amd64.list
-rw-r--r-- 1 root root 23536 Mär 24 17:12 libpython3.10-stdlib:amd64.md5sums
-rwxr-xr-x 1 root root 1161 Mär 24 17:12 libpython3.10-stdlib:amd64.prerm
Remove manually the package
$ sudo mv /var/lib/dpkg/info/libpython3.10-stdlib:amd64.* /tmp
Repeat the same steps for libpython3.10-minimal. Then fix the broken packages
$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libpython3.10-minimal libpython3.10-stdlib
The following packages will be upgraded:
libpython3.10-minimal libpython3.10-stdlib
2 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
5 not fully installed or removed.
Need to get 0 B/2.566 kB of archives.
After this operation, 68,6 kB disk space will be freed.
Do you want to continue? [Y/n]
dpkg: warning: files list file for package 'libpython3.10-stdlib:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libpython3.10-minimal:amd64' missing; assuming package has no files currently installed
(Reading database ... 191581 files and directories currently installed.)
Preparing to unpack .../libpython3.10-stdlib_3.10.4-1+focal2_amd64.deb ...
Unpacking libpython3.10-stdlib:amd64 (3.10.4-1+focal2) over (3.10.4-1+focal1) ...
Preparing to unpack .../libpython3.10-minimal_3.10.4-1+focal2_amd64.deb ...
Unpacking libpython3.10-minimal:amd64 (3.10.4-1+focal2) over (3.10.4-1+focal1) ...
Setting up libpython3.10-minimal:amd64 (3.10.4-1+focal2) ...
Setting up python3.10-minimal (3.10.4-1+focal2) ...
Setting up libpython3.10-stdlib:amd64 (3.10.4-1+focal2) ...
Setting up libpython3.10:amd64 (3.10.4-1+focal2) ...
Setting up python3.10 (3.10.4-1+focal2) ...
Setting up libpython3.10-dev:amd64 (3.10.4-1+focal2) ...
Setting up python3.10-dev (3.10.4-1+focal2) ...
I had the same error. I followed the instructions in the first and second answer and I got this:
/var/cache/apt/archives/libpython3.10-stdlib_3.10.4-1+focal2_amd64.debE: Sub-process /usr/bin/dpkg returned an error code (1)
After move this :
sudo mv /var/cache/apt/archives/libpython3.10-stdlib_3.10.4-1+focal2_amd64.deb /tmp
It works !
Same thing happened to me. When apt fails I go for https://pkgs.org/, search the package, download and install manually. It usually works.

CRYPTO_num_locks error occurs due to two versions of libcurl on Centos 7

I've trying to build some c++ libraries on a virtual Centos 7 distribution.
For a reason that I haven't found out this os can't see the /usr/local/lib or /usr/local/lib64 where these libraries are installed as other linux distributions do. So I had to add these folders on /etc/ld.so.conf. Then the c++ linker was able to see these libraries.
However when afterwards I gave
sudo yum update
I got the following message:
/usr/lib64/python2.7/site-packages/pycurl.so: undefined symbol: CRYPTO_num_locks
After searching I found that it was cause due to the existence of two version of libcurl. I gave
ldconfig -v | grep libcurl
And I got the following :
ldconfig: Path `/usr/lib' given more than once
ldconfig: Path `/usr/lib64' given more than once
libcurl.so.4 -> libcurl.so.4.4.0
libcurl.so.4 -> libcurl.so.4.3.0
Meaning that I installed a new version of libcurl and now two versions coexist.
When I removed the folder paths from the /etc/ld.so.conf then yum worked fine but c++ linker could not find the c++ libaries that my app needs. I also tried to update the LD_LIBRARY_PATH but I had the same problems.
Is there a way to fix this issue without having reinstall the libraries on new location ? Is it safe to remove the older version?
The ls -lsa /usr/lib64/*curl* gave
0 lrwxrwxrwx. 1 root root 16 Aug 10 10:19 /usr/lib64/libcurl.so.4 -> libcurl.so.4.3.0
428 -rwxr-xr-x. 1 root root 435120 Nov 14 2016 /usr/lib64/libcurl.so.4.3.0
I tried giving
sudo unlink /usr/lib64/libcurl.so.4
sudo ln -s /usr/local/lib/libcurl.so.4.4.0 /usr/lib64/libcurl.so.4
I even gave them as root but every time I give ldconfig I get
libcurl.so.4 -> libcurl.so.4.3.0
while before ldconfig gives
libcurl.so.4 -> /usr/local/lib/libcurl.so.4.4.0
I had this same issue, but I didn't have two versions of curl or pycurl installed on my system. One of my end user software installs, changed the LD_LIBRARY_PATH and it didn't include /usr/lib or /usr/lib64. I tried adding them at the end of the path and I still received the same error. I added them to the front, and no more error. I have to inquire with my end user if there's a legitimate reason they excluded the default libraries from the enviroment variable.
The default path for standard libraries, as far as I know, on CentOS is /usr/lib and /usr/lib64. If you compiling from source, without explicitly specify the library path when you use ./configure, those libraries will be installed by default in /usr/local/lib or /usr/local/lib64 (usually lib64 is found on 64 bit OS). So if the libraries are installed there, you should add those path in /etc/ld.so.conf and run a ldconfig afterwards;
According to your example:
ldconfig: Path `/usr/lib' given more than once
ldconfig: Path `/usr/lib64' given more than once
libcurl.so.4 -> libcurl.so.4.4.0
libcurl.so.4 -> libcurl.so.4.3.0
libcurl.so.4 is linked to 2 different library versions and I think that's the cause of your issue.
You could remove the second link, libcurl.so.4 -> libcurl.so.4.3.0, leaving libcurl.so.4 only linked to libcurl.so.4.4.0, run ldconfig and try again.

Could I use yum to install package on redhat without root?

I recently rent a server for web-app testing purpose. Below is my server info, I assume it's Redhat linux. (I have used Ubuntu for a while).
Python 2.6.6 (r266:84292, Jul 23 2015, 15:22:56)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux2
When I wanted to install tmux on the server, I was thinking about using YUM for ease (not compile myself). When I type yum in terminal, nothing come out.
nl0391 [~]$ which yum
nl0391 [~]$
There is no rpm as well.
I supposed there is no yum installed. So I was thinking about installing yum myself from source. I got sources of yum and found I need gettext for installing yum. So I compiled gettext on my home successfully and continued to compile yum.
First I used ./configure --configure=~/.usr/local to point to my home dir which I have permission to write.
Then make and make install.
During make install, there's some problem with /etc/yum.config. It was also the permission issue so I change the MakeFile to let config in my ~/ect/yum.config. This helped to successfully compile yum and finish installation.
I can successfully run command yum or man yum. I believe the installation is right.
But when I ran yum install tmux or yum info (let yum do something), the errors kept going out like below:
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
File "/home/wxx920521/.usr/local/bin/yum", line 31, in <module>
yummain.main(sys.argv[1:])
File "/home/wxx920521/.usr/local/src/yum-2.0.7/yummain.py", line 163, in main
(log, errorlog, filelog, conf, cmds) = parseCmdArgs(args)
File "/home/wxx920521/.usr/local/src/yum-2.0.7/yummain.py", line 75, in parseCmdArgs
conf=yumconf(configfile=yumconffile)
File "/home/wxx920521/.usr/local/src/yum-2.0.7/config.py", line 155, in __init__
self.yumvar['releasever'] = self._getsysver()
File "/home/wxx920521/.usr/local/src/yum-2.0.7/config.py", line 285, in _getsysver
idx = ts.dbMatch('provides', self.distroverpkg)
_rpm.error: rpmdb open failed.
I even changed the python files of YUM to fix the yum.conf file path issues, but for rpmdb issue I just realized manually resolving this path might be nightmare and impossible.
So I am wondering if I can use YUM on the root for which I don't have root permission? I can directly compile tmux in my home. Is it worthwhile to devote time compiling yum which potentially can't use if no root? Since I know on ubuntu apt-get install needs sudo before any usage?
Any idea is appreciated.

httpd-2.4.9 rpm build error File not found mod_session_crypto.so,mod_mpm_event.so

I am trying to build an RPM for httpd-2.4.9 in CentOS 6 final 64 bit using command
-tb httpd-2.4.x.tar.bz2. But I am getting following file not found error:
RPM build errors:
File not found: /root/rpmbuild/BUILDROOT/httpd-2.4.9-1.x86_64/usr/lib64/httpd/modules/mod_mpm_event.so
File not found: /root/rpmbuild/BUILDROOT/httpd-2.4.9-1.x86_64/usr/lib64/httpd/modules/mod_session_crypto.so
Can any one help me sort out this issue?
I resolved this by installing the latest APR and APR Utility (http://apr.apache.org/) from source instead of pulling from yum and then installing httpd.
You may also need to change a line in the .spec file for the APR Utility if the crypto library will not install. The blog post at http://ramblin-dude.blogspot.com/2013/04/compiling-rpm-for-httpd-on-rhel-57.html explains that you need to change the line that reads make check || exit 1 to make check || continue for it to compile correctly. I'm not sure if this is relevant in CentOS 6 but in my system with CentOS 5 I had to do this.

Debian aptitude install: 'find' not found in PATH or not executable

When I try to install any package such as php5, it gives me this error.
I did update and upgrade all libraries.
root#host:~# apt-get install apache2-mpm-prefork libapache2-mod-php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
apache2-mpm-prefork is already the newest version.
The following extra packages will be installed:
libonig2 libqdbm14 php5-cli php5-common
Suggested packages:
php-pear
The following NEW packages will be installed:
libapache2-mod-php5 libonig2 libqdbm14 php5-cli php5-common
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/6,106 kB of archives.
After this operation, 18.7 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
debconf: delaying package configuration, since apt-utils is not installed
dpkg: warning: 'find' not found in PATH or not executable
dpkg: error: 1 expected program not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)
Can someone help me?
There is probably something messed up with the permissions of find, find on your installation is probably located in /usr/bin/find, to check the permissions of this application run
ls -l /usr/bin/find
This should return something like this:
-rwxr-xr-x 1 root root 136152 Oct 26 2010 /usr/bin/find
If this returns an error, try to ls find on other locations in you path (eg. /bin/find, /usr/local/sbin/find)
The first part should be identical for the command to work. If not, reset the permissions to with the following command:
chmod 755 /usr/bin/find
This should fix it.