Welcome Guest. Please Login or Register  


You are here: Index > Webuzo > General Support > Topic : Python 3 error loading libintl.so.8



Threaded Mode | Print  

 Python 3 error loading libintl.so.8 (2 Replies, Read 20176 times)
erile
Group: Member
Post Group: Working Newbie
Posts: 64
Status:
Hello,

I installed Python 3 from Webuzo and running a simple "python3 -V" from SSH, it gives me this error : "python3: error while loading shared libraries: libintl.so.8: cannot open shared object file: No such file or directory".

What's going wrong?
Is the Webuzo's Python3 install OK for CentOS 7 or should I go outside of Webuzo for the Python3 case?

TIA

-----------------------
OpenVZ VPS, CentOS 7, Webuzo Premium / Desktop and full-stack dev w/ C, C++, Python, Perl, javascript...
IP: --   

Python 3 error loading libintl.so.8
erile
Group: Member
Post Group: Working Newbie
Posts: 64
Status:
And yet I can see this lib in some place:
Code
[root@prod ~]# locate libintl.so.8
/usr/local/apps/lib/libintl.so.8
/usr/local/apps/lib/libintl.so.8.1.3
/usr/local/emps/lib/libintl.so.8
/usr/local/emps/lib/libintl.so.8.1.2


-----------------------
OpenVZ VPS, CentOS 7, Webuzo Premium / Desktop and full-stack dev w/ C, C++, Python, Perl, javascript...
IP: --   

Python 3 error loading libintl.so.8
erile
Group: Member
Post Group: Working Newbie
Posts: 64
Status:
OK, I investigated...

ldd confirmed that libintl.so.8 was not found in the paths (ie. RPATH) expected by python3:
Code
[root@prod ~]# ldd /usr/local/apps/python3/bin/python3
        linux-vdso.so.1 =>  (0x00007ffff8500000)
        libpython3.6m.so.1.0 => /usr/local/apps/python3/lib/libpython3.6m.so.1.0 (0x00007f5bf8ce3000)
        libintl.so.8 => not found
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f5bf8ac0000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f5bf88bc000)
        libutil.so.1 => /lib64/libutil.so.1 (0x00007f5bf86b8000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f5bf84b0000)
        libssl.so.1.0.0 => /lib64/libssl.so.1.0.0 (0x00007f5bf8240000)
        libcrypto.so.1.0.0 => /lib64/libcrypto.so.1.0.0 (0x00007f5bf7e08000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f5bf7b06000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f5bf7739000)
        /lib64/ld-linux-x86-64.so.2 (0x0000565336802000)
        libintl.so.8 => not found

Then, I simply patched python3 to have an RPATH containg the right ones with a tool called patchELF (of course, I saved the orginal binary in case):
Code
cp /usr/local/apps/python3/bin/python3 /usr/local/apps/python3/bin/python3.ORG
wget <link_to_download_patchelf-0.10.tar.gz_but_as_newbie_in_this_forum_I'm_not_allowed_to post_any_URL>
tar xvzf patchelf-0.10.tar.gz
cd patchelf-0.10
./configure --prefix=/usr/local
make
make install
cd ..
patchelf --set-rpath /usr/local/apps/python3/lib:/lib64:/usr/local/apps/lib /usr/local/apps/python3/bin/python3

So, now:
[root@prod ~]# python3 -V
Python 3.6.4

Solved :)

-----------------------
OpenVZ VPS, CentOS 7, Webuzo Premium / Desktop and full-stack dev w/ C, C++, Python, Perl, javascript...
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is March 28, 2024, 11:33 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 10  |  Page Created In:0.041