Yum commands are not working

Issues related to applications and software problems
Post Reply
rvalverdec
Posts: 1
Joined: 2019/11/08 15:41:06

Yum commands are not working

Post by rvalverdec » 2019/11/08 15:55:45

Hi, I have Centos 6.7,

I ran the below command and I think that it broken python:

rpm --rebuilddb

Example:
-bash-4.1# yum --h
-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or directory

I have this directories:
-bash-4.1# ls /usr/bin/python
python python2 python2.6 pythonbkp
-bash-4.1# ls /usr/bin/python
/usr/bin/python
-bash-4.1# ls /usr/bin/python2
/usr/bin/python2
-bash-4.1# ls /usr/bin/python2.6
/usr/bin/python2.6
-bash-4.1# ls /usr/bin/pythonbkp
/usr/bin/pythonbkp

-bash-4.1# /usr/bin/python2.6 -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/lib64/python2.6/site.pyc matches /usr/lib64/python2.6/site.py
import site # precompiled from /usr/lib64/python2.6/site.pyc
# /usr/lib64/python2.6/os.pyc matches /usr/lib64/python2.6/os.py
import os # precompiled from /usr/lib64/python2.6/os.pyc
import errno # builtin
import posix # builtin
# /usr/lib64/python2.6/posixpath.pyc matches /usr/lib64/python2.6/posixpath.py
import posixpath # precompiled from /usr/lib64/python2.6/posixpath.pyc
# /usr/lib64/python2.6/stat.pyc matches /usr/lib64/python2.6/stat.py
import stat # precompiled from /usr/lib64/python2.6/stat.pyc
# /usr/lib64/python2.6/genericpath.pyc matches /usr/lib64/python2.6/genericpath.py
import genericpath # precompiled from /usr/lib64/python2.6/genericpath.pyc
# /usr/lib64/python2.6/warnings.pyc matches /usr/lib64/python2.6/warnings.py
import warnings # precompiled from /usr/lib64/python2.6/warnings.pyc
# /usr/lib64/python2.6/linecache.pyc matches /usr/lib64/python2.6/linecache.py
import linecache # precompiled from /usr/lib64/python2.6/linecache.pyc
# /usr/lib64/python2.6/types.pyc matches /usr/lib64/python2.6/types.py
import types # precompiled from /usr/lib64/python2.6/types.pyc
# /usr/lib64/python2.6/UserDict.pyc matches /usr/lib64/python2.6/UserDict.py
import UserDict # precompiled from /usr/lib64/python2.6/UserDict.pyc
# /usr/lib64/python2.6/_abcoll.pyc matches /usr/lib64/python2.6/_abcoll.py
import _abcoll # precompiled from /usr/lib64/python2.6/_abcoll.pyc
# /usr/lib64/python2.6/abc.pyc matches /usr/lib64/python2.6/abc.py
import abc # precompiled from /usr/lib64/python2.6/abc.pyc
# /usr/lib64/python2.6/copy_reg.pyc matches /usr/lib64/python2.6/copy_reg.py
import copy_reg # precompiled from /usr/lib64/python2.6/copy_reg.pyc
import encodings # directory /usr/lib64/python2.6/encodings
# /usr/lib64/python2.6/encodings/__init__.pyc matches /usr/lib64/python2.6/encodings/__init__.py
import encodings # precompiled from /usr/lib64/python2.6/encodings/__init__.pyc
# /usr/lib64/python2.6/codecs.pyc matches /usr/lib64/python2.6/codecs.py
import codecs # precompiled from /usr/lib64/python2.6/codecs.pyc
import _codecs # builtin
# /usr/lib64/python2.6/encodings/aliases.pyc matches /usr/lib64/python2.6/encodings/aliases.py
import encodings.aliases # precompiled from /usr/lib64/python2.6/encodings/aliases.pyc
# /usr/lib64/python2.6/encodings/utf_8.pyc matches /usr/lib64/python2.6/encodings/utf_8.py
import encodings.utf_8 # precompiled from /usr/lib64/python2.6/encodings/utf_8.pyc
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
Type "help", "copyright", "credits" or "license" for more information.
dlopen("/usr/lib64/python2.6/lib-dynload/readline.so", 2);
import readline # dynamically loaded from /usr/lib64/python2.6/lib-dynload/readline.so
>>>

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Yum commands are not working

Post by TrevorH » 2019/11/08 20:17:58

Run rpm -Va python\* and post the results
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Whoever
Posts: 1361
Joined: 2013/09/06 03:12:10

Re: Yum commands are not working

Post by Whoever » 2019/11/09 02:47:10

TrevorH wrote:
2019/11/08 20:17:58
Run rpm -Va python\* and post the results
Also:

Code: Select all

rpm -V yum

Post Reply