git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

python not working on RHEL6


On 2018-10-02 15:59, mchathuranga4 at gmail.com wrote:
> Hi All,
> 
> I'm a beginner on this. I was trying to install a new python version which is 2.7.5. My OS(RHEL6) had already installed version 2.6. so I downloaded the tar and unzipped it then executed
>  
> ./configure --prefix=/usr       \
>             --enable-shared     \
>             --with-system-expat \
>             --with-system-ffi   \
>             --enable-unicode=ucs4 &&
> make 
> 
> afterwards 
> sudo make install &&
> sudo chmod -v 755 /usr/lib/libpython2.7.so.1.0
> 
> http://www.linuxfromscratch.org/blfs/view/7.4/general/python2.html This is what I followed and which got me here.
> 
> everything was successfully finished.
> 
> afterwards when I type python in the terminal I get below error: 
> 
> python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory

I have no idea what's going on, but in any case you should make sure
your /usr/bin/python works and points to the system python2.6.  Maybe
"sudo yum reinstall python" is the way to go. Then perhaps you should
delete all Python2.7 files and try again (preferably, not in /usr -
that's for OS-installed files only. /usr/local is a nice place to put
things you installed from source)

The in some sense "official" way to get Python 2.7 on an EL6 system is
to install it through the software collections mechanism:
https://www.softwarecollections.org/en/scls/rhscl/python27/

Better yet, forget about Python 2.7 and use Python 3.7 (or 3.6, which is
available as an SCL)


> 
> I guess from the little knowledge I have I should have executed altinstall instead of install. Anyone know how to resolve this?
> 
> Thanks.
> 


-- 
Thomas Jollans

m ? +31 (6) 42630259
e ? tjol at tjol.eu