Originally posted by: v1rotate
My first attempt at asking question here :)
AIX 7.1 running very limited number of packages - essentially whatever is bare minimum required to run python v2.7.15 (Yes, it is old and the purpose of the effort is to upgrade to v3)
Python v2.7.15 was installed with rpm tool with the exception of openssl, via installp.
In order to try to have python v2 coexist, taking the path of utilizing yum package management tool.
However in order to get yum installed and working, we decided not to downgrade Python to v2.7.10 and leave Python at v2.7.15 as we installed the tar bundled package for yum to be used.
It seems like yum is having issues when invoked as follows:
bash-3.00# yum
bash: /usr/bin/yum: /opt/freeware/bin/python2: bad interpreter: No such file or directory
Most of the information is below. One issue could be that yum may be looking for python v2.7.10 but I dont want to downgrade.
Also, python is: which python
/usr/bin/python
I thought updating /usr/bin/yum by pointing to a working python version may work. so I updated the line from #!/opt/freeware/bin/python2 to #!/usr/bin/python and re ran yum help command and then got the following error:
bash-3.00# yum help
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
No module named yum
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.7.15 (default, May 7 2018, 16:04:01) [C]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
Some additional information:
bash-3.00# ldd /usr/bin/python
/usr/bin/python needs:
/usr/lib/libc.a(shr_64.o)
/usr/lib/libpthreads.a(shr_xpg5_64.o)
/usr/lib/libdl.a(shr_64.o)
/unix
/usr/lib/libcrypt.a(shr_64.o)
bash-3.00# rpm -qf `which yum`
yum-3.4.3-7.noarch
bash-3.00# env
AUTHSTATE=compat
WSM_WS_CMD="startsrc -s http4websm"
TERM=xterm
SHELL=/usr/bin/ksh
SSH_CLIENT=172.X.X.X 56374 22
OLDPWD=/usr/bin
WSM_DOC_DIR="/usr/websm/http/com.ibm.websm.http.server_1.0.0"
SSH_TTY=/dev/pts/0
LOCPATH=/usr/lib/nls/loc
USER=root
ODMDIR=/etc/objrepos
SUDO_USER=whoareyou
SUDO_UID=227
RES_RETRY=1
A__z=! LOGNAME
MAIL=/usr/spool/mail/fe99tbd
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/whoareyou/bin:/usr/bin/X11:/sbin:.
LOGIN=root
PWD=/opt/freeware/bin
LANG=C
TZ=EST5EDT
WSM_CGI_DIR=
SHLVL=1
HOME=/home/whoareyou
SUDO_COMMAND=/usr/bin/su
LC__FASTMSG=true
MAILMSG=[YOU HAVE NEW MAIL]
LOGNAME=root
SSH_CONNECTION=172.X.X.X 56374 172.X.X.X 22
DISPLAY=localhost:12.0
RES_TIMEOUT=1
SUDO_GID=1
EXTENDED_HISTORY=ON
_=/usr/bin/env
bash-3.00# rpm -Va
SM5....T. /opt/freeware/lib/libintl.a
....L.... /usr/share/locale
Unsatisfied dependencies for python-pycurl-7.19.5-1.noarch:
libcurl >= 7.28.0 is needed by (installed) python-pycurl-7.19.5-1.noarch
libcrypto.so is needed by (installed) python-pycurl-7.19.5-1.noarch
libssl.so is needed by (installed) python-pycurl-7.19.5-1.noarch
S.5....T. /opt/freeware/lib/libsqlite3.so
SM5....T. /opt/freeware/lib/libz.a
Unsatisfied dependencies for yum-3.4.3-7.noarch:
python >= 2.7 is needed by (installed) yum-3.4.3-7.noarch
/opt/freeware/bin/python2 is needed by (installed) yum-3.4.3-7.noarch
S.5....T. /opt/freeware/bin/yum
S.5....T. c /opt/freeware/etc/yum/yum.conf
Unsatisfied dependencies for python-tools-2.7.10-1.ppc:
python = 2.7.10 is needed by (installed) python-tools-2.7.10-1.ppc
/opt/freeware/bin/python is needed by (installed) python-tools-2.7.10-1.ppc
/opt/freeware/bin/python2.7 is needed by (installed) python-tools-2.7.10-1.ppc
/opt/freeware/bin/python2.7_64 is needed by (installed) python-tools-2.7.10-1.ppc
/usr/bin/python is needed by (installed) python-tools-2.7.10-1.ppc
Unsatisfied dependencies for python-devel-2.7.10-1.ppc:
python = 2.7.10 is needed by (installed) python-devel-2.7.10-1.ppc
S.5....T. /opt/freeware/bin/bunzip2
S.5....T. /opt/freeware/bin/bzcat
S.5....T. /opt/freeware/bin/bzip2
S.5....T. /opt/freeware/bin/bzip2recover
SM5....T. /opt/freeware/lib/libbz2.a
SM5....T. /opt/freeware/lib/libdb-4.8.a
S.5....T. /opt/freeware/lib/libdb-4.8.so
....L.... /opt/freeware/lib/libdb-4.a
....L.... /opt/freeware/lib/libdb-4.so
....L.... /opt/freeware/lib/libdb.a
....L.... /opt/freeware/lib/libdb.so
....L.... /opt/freeware/lib/libdb4.a
S.5....T. /opt/freeware/bin/install-info
Unsatisfied dependencies for python-PyYAML-3.11-2.ppc:
libyaml.a(libyaml-0.so.2) is needed by (installed) python-PyYAML-3.11-2.ppc
SM5....T. /opt/freeware/lib/libhistory.a
SM5....T. /opt/freeware/lib/libreadline.a
S.5....T. /etc/sudoers
Unsatisfied dependencies for python-urlgrabber-3.10.1-1.noarch:
python >= 2.7 is needed by (installed) python-urlgrabber-3.10.1-1.noarch
/opt/freeware/bin/python is needed by (installed) python-urlgrabber-3.10.1-1.noarch
Unsatisfied dependencies for python-iniparse-0.4-1.noarch:
python >= 2.7 is needed by (installed) python-iniparse-0.4-1.noarch
Unsatisfied dependencies for pysqlite-1.1.7-2.ppc:
python >= 2.7 is needed by (installed) pysqlite-1.1.7-2.ppc
I just want to get yum package working so I can start using yum to install Python 3 and all of its dependency.