Python issues on CentOS - error loading shared libraries - libpython2.7.so.1.0
I was advised to post this here from the community at Stack Overflow.
One of our CentOS servers has went into a strange state and is complaining that libpython2.7.so.1.0
cannot open shared object files. Yum is unusable and other features are failing to function (such as sending mail from the system, SSH'ing to it etc.) I really don't want to have to rebuild the server from scratch and I'm hoping someone can advise on a fix for me.
An example of the error I am presented with when running Yum:
/usr/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
Please note, I cannot use the pipe symbol (as I am having to manage the system via VMware console) and I cannot copy text from this console either, so if you require me to run any commands I will have to type the results out manually.
Answers to the questions asked on Stack Overflow:
Typing python
into the CLI still works and opens Python (note the date/time stamp below is when this stopped working!):
Python 2.7.15 (default, Jun 18 2018, 08:40:16)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
>>>
Typing rpm --verify -a
into the CLI returns the following:
$ rpm --verify -a
rpm: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
centos python yum
bumped to the homepage by Community♦ 52 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 1 more comment
I was advised to post this here from the community at Stack Overflow.
One of our CentOS servers has went into a strange state and is complaining that libpython2.7.so.1.0
cannot open shared object files. Yum is unusable and other features are failing to function (such as sending mail from the system, SSH'ing to it etc.) I really don't want to have to rebuild the server from scratch and I'm hoping someone can advise on a fix for me.
An example of the error I am presented with when running Yum:
/usr/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
Please note, I cannot use the pipe symbol (as I am having to manage the system via VMware console) and I cannot copy text from this console either, so if you require me to run any commands I will have to type the results out manually.
Answers to the questions asked on Stack Overflow:
Typing python
into the CLI still works and opens Python (note the date/time stamp below is when this stopped working!):
Python 2.7.15 (default, Jun 18 2018, 08:40:16)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
>>>
Typing rpm --verify -a
into the CLI returns the following:
$ rpm --verify -a
rpm: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
centos python yum
bumped to the homepage by Community♦ 52 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Do either of those library files exist on the system? Asroot
, you can find them by first runningupdatedb
and thenlocate libpython2.7.so.1.0
andlocate libnss3.so
. If they aren't there then that's where your problem is.
– Nasir Riley
Jul 6 '18 at 14:00
updatedb is not a command which is found. Neither is locate. We have done 'find / -name libnss3.so' but this returned no results. This system worked previously until a yum update was ran (and crashed).
– Tom Whitfield
Jul 6 '18 at 14:06
You can compile Python from source (takes about 5 mins), copy the compiledlibpython2.7.so.1.0
from selected prefix to/usr/lib64
and reinstall the python dist package withyum
. Thing is, it looks likelibpython2.7
is not the only lib you're missing, ifyum
will require more libs, you can end up in compiling a bunch of libs from source in order to makeyum
usable again. But at least try compiling this one, maybe it will already suffice.
– hoefling
Jul 6 '18 at 15:23
If thefind
command didn't locate it then it's not there which is your issue. The easiest solution is to build it from source.
– Nasir Riley
Jul 6 '18 at 15:33
You mentioned the date in the Python interpreter (Jun 18 2018) is when everything stopped working. Did someone attempt to upgrade the system's Python version manually? I do not see that Redhat/CentOS offers Python v2.7.15 as their current Python version is pinned to 2.7.5. Fixing that would require getting the system provided Python back onto the server. Since you want to avoid rebuilding, you could mount the disk on a working CentOS machine, useyum --installroot=/where/you/mounted/your/disk
and make sure all the proper Python packages are put back in place.
– GracefulRestart
Jul 6 '18 at 22:38
|
show 1 more comment
I was advised to post this here from the community at Stack Overflow.
One of our CentOS servers has went into a strange state and is complaining that libpython2.7.so.1.0
cannot open shared object files. Yum is unusable and other features are failing to function (such as sending mail from the system, SSH'ing to it etc.) I really don't want to have to rebuild the server from scratch and I'm hoping someone can advise on a fix for me.
An example of the error I am presented with when running Yum:
/usr/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
Please note, I cannot use the pipe symbol (as I am having to manage the system via VMware console) and I cannot copy text from this console either, so if you require me to run any commands I will have to type the results out manually.
Answers to the questions asked on Stack Overflow:
Typing python
into the CLI still works and opens Python (note the date/time stamp below is when this stopped working!):
Python 2.7.15 (default, Jun 18 2018, 08:40:16)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
>>>
Typing rpm --verify -a
into the CLI returns the following:
$ rpm --verify -a
rpm: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
centos python yum
I was advised to post this here from the community at Stack Overflow.
One of our CentOS servers has went into a strange state and is complaining that libpython2.7.so.1.0
cannot open shared object files. Yum is unusable and other features are failing to function (such as sending mail from the system, SSH'ing to it etc.) I really don't want to have to rebuild the server from scratch and I'm hoping someone can advise on a fix for me.
An example of the error I am presented with when running Yum:
/usr/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
Please note, I cannot use the pipe symbol (as I am having to manage the system via VMware console) and I cannot copy text from this console either, so if you require me to run any commands I will have to type the results out manually.
Answers to the questions asked on Stack Overflow:
Typing python
into the CLI still works and opens Python (note the date/time stamp below is when this stopped working!):
Python 2.7.15 (default, Jun 18 2018, 08:40:16)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
>>>
Typing rpm --verify -a
into the CLI returns the following:
$ rpm --verify -a
rpm: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
centos python yum
centos python yum
edited Jul 15 '18 at 11:47
Jeff Schaller
42.9k1159137
42.9k1159137
asked Jul 6 '18 at 13:36
Tom WhitfieldTom Whitfield
161
161
bumped to the homepage by Community♦ 52 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 52 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Do either of those library files exist on the system? Asroot
, you can find them by first runningupdatedb
and thenlocate libpython2.7.so.1.0
andlocate libnss3.so
. If they aren't there then that's where your problem is.
– Nasir Riley
Jul 6 '18 at 14:00
updatedb is not a command which is found. Neither is locate. We have done 'find / -name libnss3.so' but this returned no results. This system worked previously until a yum update was ran (and crashed).
– Tom Whitfield
Jul 6 '18 at 14:06
You can compile Python from source (takes about 5 mins), copy the compiledlibpython2.7.so.1.0
from selected prefix to/usr/lib64
and reinstall the python dist package withyum
. Thing is, it looks likelibpython2.7
is not the only lib you're missing, ifyum
will require more libs, you can end up in compiling a bunch of libs from source in order to makeyum
usable again. But at least try compiling this one, maybe it will already suffice.
– hoefling
Jul 6 '18 at 15:23
If thefind
command didn't locate it then it's not there which is your issue. The easiest solution is to build it from source.
– Nasir Riley
Jul 6 '18 at 15:33
You mentioned the date in the Python interpreter (Jun 18 2018) is when everything stopped working. Did someone attempt to upgrade the system's Python version manually? I do not see that Redhat/CentOS offers Python v2.7.15 as their current Python version is pinned to 2.7.5. Fixing that would require getting the system provided Python back onto the server. Since you want to avoid rebuilding, you could mount the disk on a working CentOS machine, useyum --installroot=/where/you/mounted/your/disk
and make sure all the proper Python packages are put back in place.
– GracefulRestart
Jul 6 '18 at 22:38
|
show 1 more comment
Do either of those library files exist on the system? Asroot
, you can find them by first runningupdatedb
and thenlocate libpython2.7.so.1.0
andlocate libnss3.so
. If they aren't there then that's where your problem is.
– Nasir Riley
Jul 6 '18 at 14:00
updatedb is not a command which is found. Neither is locate. We have done 'find / -name libnss3.so' but this returned no results. This system worked previously until a yum update was ran (and crashed).
– Tom Whitfield
Jul 6 '18 at 14:06
You can compile Python from source (takes about 5 mins), copy the compiledlibpython2.7.so.1.0
from selected prefix to/usr/lib64
and reinstall the python dist package withyum
. Thing is, it looks likelibpython2.7
is not the only lib you're missing, ifyum
will require more libs, you can end up in compiling a bunch of libs from source in order to makeyum
usable again. But at least try compiling this one, maybe it will already suffice.
– hoefling
Jul 6 '18 at 15:23
If thefind
command didn't locate it then it's not there which is your issue. The easiest solution is to build it from source.
– Nasir Riley
Jul 6 '18 at 15:33
You mentioned the date in the Python interpreter (Jun 18 2018) is when everything stopped working. Did someone attempt to upgrade the system's Python version manually? I do not see that Redhat/CentOS offers Python v2.7.15 as their current Python version is pinned to 2.7.5. Fixing that would require getting the system provided Python back onto the server. Since you want to avoid rebuilding, you could mount the disk on a working CentOS machine, useyum --installroot=/where/you/mounted/your/disk
and make sure all the proper Python packages are put back in place.
– GracefulRestart
Jul 6 '18 at 22:38
Do either of those library files exist on the system? As
root
, you can find them by first running updatedb
and then locate libpython2.7.so.1.0
and locate libnss3.so
. If they aren't there then that's where your problem is.– Nasir Riley
Jul 6 '18 at 14:00
Do either of those library files exist on the system? As
root
, you can find them by first running updatedb
and then locate libpython2.7.so.1.0
and locate libnss3.so
. If they aren't there then that's where your problem is.– Nasir Riley
Jul 6 '18 at 14:00
updatedb is not a command which is found. Neither is locate. We have done 'find / -name libnss3.so' but this returned no results. This system worked previously until a yum update was ran (and crashed).
– Tom Whitfield
Jul 6 '18 at 14:06
updatedb is not a command which is found. Neither is locate. We have done 'find / -name libnss3.so' but this returned no results. This system worked previously until a yum update was ran (and crashed).
– Tom Whitfield
Jul 6 '18 at 14:06
You can compile Python from source (takes about 5 mins), copy the compiled
libpython2.7.so.1.0
from selected prefix to /usr/lib64
and reinstall the python dist package with yum
. Thing is, it looks like libpython2.7
is not the only lib you're missing, if yum
will require more libs, you can end up in compiling a bunch of libs from source in order to make yum
usable again. But at least try compiling this one, maybe it will already suffice.– hoefling
Jul 6 '18 at 15:23
You can compile Python from source (takes about 5 mins), copy the compiled
libpython2.7.so.1.0
from selected prefix to /usr/lib64
and reinstall the python dist package with yum
. Thing is, it looks like libpython2.7
is not the only lib you're missing, if yum
will require more libs, you can end up in compiling a bunch of libs from source in order to make yum
usable again. But at least try compiling this one, maybe it will already suffice.– hoefling
Jul 6 '18 at 15:23
If the
find
command didn't locate it then it's not there which is your issue. The easiest solution is to build it from source.– Nasir Riley
Jul 6 '18 at 15:33
If the
find
command didn't locate it then it's not there which is your issue. The easiest solution is to build it from source.– Nasir Riley
Jul 6 '18 at 15:33
You mentioned the date in the Python interpreter (Jun 18 2018) is when everything stopped working. Did someone attempt to upgrade the system's Python version manually? I do not see that Redhat/CentOS offers Python v2.7.15 as their current Python version is pinned to 2.7.5. Fixing that would require getting the system provided Python back onto the server. Since you want to avoid rebuilding, you could mount the disk on a working CentOS machine, use
yum --installroot=/where/you/mounted/your/disk
and make sure all the proper Python packages are put back in place.– GracefulRestart
Jul 6 '18 at 22:38
You mentioned the date in the Python interpreter (Jun 18 2018) is when everything stopped working. Did someone attempt to upgrade the system's Python version manually? I do not see that Redhat/CentOS offers Python v2.7.15 as their current Python version is pinned to 2.7.5. Fixing that would require getting the system provided Python back onto the server. Since you want to avoid rebuilding, you could mount the disk on a working CentOS machine, use
yum --installroot=/where/you/mounted/your/disk
and make sure all the proper Python packages are put back in place.– GracefulRestart
Jul 6 '18 at 22:38
|
show 1 more comment
1 Answer
1
active
oldest
votes
Usually, when I have a shared libraries issue, I use yum provides
to install those. For example:
$ sudo yum provides libpython2.7.so.1.0
[sudo] password
Loaded plugins: nvidia
python-libs-2.7.5-68.el7.i686 : Runtime libraries for Python
Repo : base
Matched from:
Provides : libpython2.7.so.1.0
So, to be able to do that, I suggest I remove yum
and reinstall it using rpm package:
$ sudo rpm -e yum
#download yum.rpm
$ sudo rpm -ivh yum.rpm
You can download yum rpm package from here. You might also need to remove packages linked to yum like yum-utils
...
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f453856%2fpython-issues-on-centos-error-loading-shared-libraries-libpython2-7-so-1-0%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Usually, when I have a shared libraries issue, I use yum provides
to install those. For example:
$ sudo yum provides libpython2.7.so.1.0
[sudo] password
Loaded plugins: nvidia
python-libs-2.7.5-68.el7.i686 : Runtime libraries for Python
Repo : base
Matched from:
Provides : libpython2.7.so.1.0
So, to be able to do that, I suggest I remove yum
and reinstall it using rpm package:
$ sudo rpm -e yum
#download yum.rpm
$ sudo rpm -ivh yum.rpm
You can download yum rpm package from here. You might also need to remove packages linked to yum like yum-utils
...
add a comment |
Usually, when I have a shared libraries issue, I use yum provides
to install those. For example:
$ sudo yum provides libpython2.7.so.1.0
[sudo] password
Loaded plugins: nvidia
python-libs-2.7.5-68.el7.i686 : Runtime libraries for Python
Repo : base
Matched from:
Provides : libpython2.7.so.1.0
So, to be able to do that, I suggest I remove yum
and reinstall it using rpm package:
$ sudo rpm -e yum
#download yum.rpm
$ sudo rpm -ivh yum.rpm
You can download yum rpm package from here. You might also need to remove packages linked to yum like yum-utils
...
add a comment |
Usually, when I have a shared libraries issue, I use yum provides
to install those. For example:
$ sudo yum provides libpython2.7.so.1.0
[sudo] password
Loaded plugins: nvidia
python-libs-2.7.5-68.el7.i686 : Runtime libraries for Python
Repo : base
Matched from:
Provides : libpython2.7.so.1.0
So, to be able to do that, I suggest I remove yum
and reinstall it using rpm package:
$ sudo rpm -e yum
#download yum.rpm
$ sudo rpm -ivh yum.rpm
You can download yum rpm package from here. You might also need to remove packages linked to yum like yum-utils
...
Usually, when I have a shared libraries issue, I use yum provides
to install those. For example:
$ sudo yum provides libpython2.7.so.1.0
[sudo] password
Loaded plugins: nvidia
python-libs-2.7.5-68.el7.i686 : Runtime libraries for Python
Repo : base
Matched from:
Provides : libpython2.7.so.1.0
So, to be able to do that, I suggest I remove yum
and reinstall it using rpm package:
$ sudo rpm -e yum
#download yum.rpm
$ sudo rpm -ivh yum.rpm
You can download yum rpm package from here. You might also need to remove packages linked to yum like yum-utils
...
edited Jul 6 '18 at 15:24
slm♦
253k70534685
253k70534685
answered Jul 6 '18 at 14:08
Kevin LemaireKevin Lemaire
1,178724
1,178724
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f453856%2fpython-issues-on-centos-error-loading-shared-libraries-libpython2-7-so-1-0%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Do either of those library files exist on the system? As
root
, you can find them by first runningupdatedb
and thenlocate libpython2.7.so.1.0
andlocate libnss3.so
. If they aren't there then that's where your problem is.– Nasir Riley
Jul 6 '18 at 14:00
updatedb is not a command which is found. Neither is locate. We have done 'find / -name libnss3.so' but this returned no results. This system worked previously until a yum update was ran (and crashed).
– Tom Whitfield
Jul 6 '18 at 14:06
You can compile Python from source (takes about 5 mins), copy the compiled
libpython2.7.so.1.0
from selected prefix to/usr/lib64
and reinstall the python dist package withyum
. Thing is, it looks likelibpython2.7
is not the only lib you're missing, ifyum
will require more libs, you can end up in compiling a bunch of libs from source in order to makeyum
usable again. But at least try compiling this one, maybe it will already suffice.– hoefling
Jul 6 '18 at 15:23
If the
find
command didn't locate it then it's not there which is your issue. The easiest solution is to build it from source.– Nasir Riley
Jul 6 '18 at 15:33
You mentioned the date in the Python interpreter (Jun 18 2018) is when everything stopped working. Did someone attempt to upgrade the system's Python version manually? I do not see that Redhat/CentOS offers Python v2.7.15 as their current Python version is pinned to 2.7.5. Fixing that would require getting the system provided Python back onto the server. Since you want to avoid rebuilding, you could mount the disk on a working CentOS machine, use
yum --installroot=/where/you/mounted/your/disk
and make sure all the proper Python packages are put back in place.– GracefulRestart
Jul 6 '18 at 22:38