LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 02-13-2011, 05:04 PM   #1
dav0
Member
 
Registered: Feb 2011
Posts: 32
Blog Entries: 1

Rep: Reputation: 0
yum / Python installation error


I am running the 64 bit Fedora 14 distro and everything was running fine but now I am seeing this when trying to run yum:

[root@skye ~]# yum info
Traceback (most recent call last):
File "/usr/lib64/python2.7/site.py", line 553, in <module>
main()
File "/usr/lib64/python2.7/site.py", line 535, in main
known_paths = addusersitepackages(known_paths)
File "/usr/lib64/python2.7/site.py", line 264, in addusersitepackages
user_site = getusersitepackages()
File "/usr/lib64/python2.7/site.py", line 239, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/usr/lib64/python2.7/site.py", line 229, in getuserbase
USER_BASE = get_config_var('userbase')
File "/usr/lib64/python2.7/sysconfig.py", line 518, in get_config_var
return get_config_vars().get(name)
File "/usr/lib64/python2.7/sysconfig.py", line 421, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/usr/lib64/python2.7/sysconfig.py", line 275, in _init_posix
raise IOError(msg)
IOError: invalid Python installation: unable to open
/usr/lib64/python2.7/lib64/python2.7/config/Makefile (No such file or
directory)

I rebooted and this does not seem to help (can't imagine why it would anyway, after all this isn't windoze, but someone on another forum with a similar problem claimed that this helped).

Now I did install a bunch of new Fedora updates over the past two days (automatically - presumeably via the yum GUI) so this might have something to do with the issue, but it's also been a month or two since I've attempted to run yum from the command line like this.

I should mention that I added a couple of comments to bug #666826 on the Red Hat Bugzilla - which seemed like a very similar issue, but I'm not sure how distro specific this problem is at this point.
 
Old 02-13-2011, 05:26 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Have you tried rebuilding the rpm database?

Code:
cd /var/lib
rm __db*
rpm --rebuilddb
rpmdb_verify Packages
 
Old 02-13-2011, 06:46 PM   #3
dav0
Member
 
Registered: Feb 2011
Posts: 32

Original Poster
Blog Entries: 1

Rep: Reputation: 0
Thanks for the idea, but no luck.

[root@skye lib]# rm __db*
rm: cannot remove `__db*': No such file or directory
[root@skye lib]# rpm --rebuilddb
[root@skye lib]# rpmdb_verify Packages
bash: rpmdb_verify: command not found...
[root@skye lib]# yum info
Traceback (most recent call last):
File "/usr/lib64/python2.7/site.py", line 553, in <module>
main()
File "/usr/lib64/python2.7/site.py", line 535, in main
known_paths = addusersitepackages(known_paths)
File "/usr/lib64/python2.7/site.py", line 264, in addusersitepackages
user_site = getusersitepackages()
File "/usr/lib64/python2.7/site.py", line 239, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/usr/lib64/python2.7/site.py", line 229, in getuserbase
USER_BASE = get_config_var('userbase')
File "/usr/lib64/python2.7/sysconfig.py", line 518, in get_config_var
return get_config_vars().get(name)
File "/usr/lib64/python2.7/sysconfig.py", line 421, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/usr/lib64/python2.7/sysconfig.py", line 275, in _init_posix
raise IOError(msg)
IOError: invalid Python installation: unable to open /usr/lib64/python2.7/lib64/python2.7/config/Makefile (No such file or directory)
[root@skye lib]# pwd
/var/lib
 
Old 02-13-2011, 06:58 PM   #4
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Code:
rm -f /var/lib/rpm/__db*
rpm --rebuilddb
Sorry, my mistake.
 
Old 02-13-2011, 07:45 PM   #5
dav0
Member
 
Registered: Feb 2011
Posts: 32

Original Poster
Blog Entries: 1

Rep: Reputation: 0
still no luck

[root@skye lib]# rm -f /var/lib/rpm/__db*
[root@skye lib]# rpm --rebuilddb
[root@skye lib]# yum info
Traceback (most recent call last):
File "/usr/lib64/python2.7/site.py", line 553, in <module>
main()
File "/usr/lib64/python2.7/site.py", line 535, in main
known_paths = addusersitepackages(known_paths)
File "/usr/lib64/python2.7/site.py", line 264, in addusersitepackages
user_site = getusersitepackages()
File "/usr/lib64/python2.7/site.py", line 239, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/usr/lib64/python2.7/site.py", line 229, in getuserbase
USER_BASE = get_config_var('userbase')
File "/usr/lib64/python2.7/sysconfig.py", line 518, in get_config_var
return get_config_vars().get(name)
File "/usr/lib64/python2.7/sysconfig.py", line 421, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/usr/lib64/python2.7/sysconfig.py", line 275, in _init_posix
raise IOError(msg)
IOError: invalid Python installation: unable to open /usr/lib64/python2.7/lib64/python2.7/config/Makefile (No such file or directory)
 
Old 02-13-2011, 07:49 PM   #6
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Hmm, weird. Can you try running yum update --skip-broken ?
 
Old 02-13-2011, 07:49 PM   #7
dav0
Member
 
Registered: Feb 2011
Posts: 32

Original Poster
Blog Entries: 1

Rep: Reputation: 0
python is apparently the issue here...

[root@skye lib]# python
Traceback (most recent call last):
File "/usr/lib64/python2.7/site.py", line 553, in <module>
main()
File "/usr/lib64/python2.7/site.py", line 535, in main
known_paths = addusersitepackages(known_paths)
File "/usr/lib64/python2.7/site.py", line 264, in addusersitepackages
user_site = getusersitepackages()
File "/usr/lib64/python2.7/site.py", line 239, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/usr/lib64/python2.7/site.py", line 229, in getuserbase
USER_BASE = get_config_var('userbase')
File "/usr/lib64/python2.7/sysconfig.py", line 518, in get_config_var
return get_config_vars().get(name)
File "/usr/lib64/python2.7/sysconfig.py", line 421, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/usr/lib64/python2.7/sysconfig.py", line 275, in _init_posix
raise IOError(msg)
IOError: invalid Python installation: unable to open /usr/lib64/python2.7/lib64/python2.7/config/Makefile (No such file or directory)
[root@skye lib]# which python
/usr/bin/python
[root@skye lib]# python -V
Python 2.7
 
Old 02-13-2011, 07:53 PM   #8
dav0
Member
 
Registered: Feb 2011
Posts: 32

Original Poster
Blog Entries: 1

Rep: Reputation: 0
yum doesn't work at all.

I thought I'd try downloading and building the latest Python, but I can't even find my gcc compiler...

[root@skye Python-2.7.1]# ./configure
checking for --enable-universalsdk... no
checking for --with-universal-archs... 32-bit
checking MACHDEP... linux2
checking EXTRAPLATDIR...
checking machine type as reported by uname -m... x86_64
checking for --without-gcc... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/opt/kits/langs/Python/Python-2.7.1':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
[root@skye Python-2.7.1]# which gcc
/usr/bin/which: no gcc in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
 
Old 02-13-2011, 09:16 PM   #9
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Damn, your system is messed up.... What did you do? I would plop the fedora dvd in and reinstall...
 
Old 02-13-2011, 09:21 PM   #10
dav0
Member
 
Registered: Feb 2011
Posts: 32

Original Poster
Blog Entries: 1

Rep: Reputation: 0
I am attempting to download all of the rpms neededs to [re]build gcc for Fedora 14 (x64), as it appears that some sort of malicious virus or horribly bad Fedora update messed up my system.

I was able to locate gcc-4.6.0-0.7.fc15.x86_64.rpm and its dependency libmpc-0.8.3-0.3.svn855.fc15.x86_64.rpm on http://koji.fedoraproject.org, but I am unable to locate it's other dependency "libmpfr"

http://koji.fedoraproject.org/koji/s...&terms=libmpfr

..returns nothing.

Does anyone have any idea what libmpfr is and where I might find it?

Thanks
 
Old 02-13-2011, 09:30 PM   #11
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
I honestly recommend just putting the boot DVD in and do it from there....
 
Old 02-13-2011, 09:47 PM   #12
dav0
Member
 
Registered: Feb 2011
Posts: 32

Original Poster
Blog Entries: 1

Rep: Reputation: 0
Probably right, so I've mounted the DVD and I'm fumbling around in the Nautilus file explorer on the DVD, but all it seems to contain of any real substance is the isolinux.bin and associated isolinux.cfg, along with (apparently) some boot strap files and things.

I cut the DVD myself some time ago from a downloaded distro, so I guess I will need to boot up to this DVD and enter repair mode or something?

(please don't tell me I am going to need to reinstall the entire system)
 
Old 02-13-2011, 09:50 PM   #13
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Pretty much... You can boot the DVD, and reinstall the system, preserving your home directory.
 
Old 02-13-2011, 10:25 PM   #14
dav0
Member
 
Registered: Feb 2011
Posts: 32

Original Poster
Blog Entries: 1

Rep: Reputation: 0
On second thought, that's too risky - especially since I'm dual-booted.

Instead I think I'll suffer through locating the rpms I need one by one (the old fashioned way).

I'd rather do this than risk blowing away the entire system.

...so let's see... where was I? Oh yeah, libmpfr.so.4

Oddly enough, I found this rpm and tried to install it, but it claimed that it was already installed.

Last edited by dav0; 02-13-2011 at 10:26 PM.
 
Old 02-13-2011, 11:44 PM   #15
dav0
Member
 
Registered: Feb 2011
Posts: 32

Original Poster
Blog Entries: 1

Rep: Reputation: 0
I'm very close to fixing this now. I managed to install gcc without yum and without having to go searching the internet for stray libraries and such...

first, I was contemplating trying to build gcc from sources, so I first thought I'd check to see whether I still at least had a cpp compiler, so I tried just typing cpp. I didn't have it, but lo and behold, didn't it go and ask me if I wanted it? Sure I said! (well "y" to be exact).


[root@skye foo]# cpp
bash: cpp: command not found...
Install package 'cpp' to provide command 'cpp'? [N/y] y
* Running..
* Resolving dependencies..
The following packages have to be installed:
libmpc-0.8.1-1.fc13.x86_64 C library for multiple precision complex arithmetic
Proceed with changes? [N/y]
* Waiting for authentication..
* Waiting in queue..
* Running..
* Resolving dependencies..
* Downloading packages..
* Testing changes..
* Installing packages..
* Scanning applications..
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "<stdin>"

Bolstered by the results of this trick, I tried the same thing with gcc and sure enough - voila!

[root@skye foo]# gcc
bash: gcc: command not found...
Install package 'gcc' to provide command 'gcc'? [N/y] y
* Running..
* Resolving dependencies..
The following packages have to be installed:
glibc-headers-2.13-1.x86_64 Header files for development using standard C libraries.
cloog-ppl-0.15.7-2.fc14.x86_64 Parma Polyhedra Library backend (ppl) based version of the Cloog binaries
glibc-devel-2.13-1.x86_64 Object files for development using standard C libraries.
ppl-0.10.2-10.fc12.x86_64 The Parma Polyhedra Library: a library of numerical abstractions
kernel-headers-2.6.35.11-83.fc14.x86_64 Header files for the Linux kernel for use by glibc
Proceed with changes? [N/y]
* Waiting for authentication..
* Waiting in queue..
* Resolving dependencies..
* Downloading packages..
* Testing changes..
* Installing packages..
* Scanning applications..
gcc: no input files

I was then able to "configure" and "make" my downloaded Python 2.7.1 package, and it made it almost all the way through the last step ("make install") before I hit this snag:

PYTHONPATH=/usr/local/lib/python2.7 \
./python -Wi -tt /usr/local/lib/python2.7/compileall.py \
-d /usr/local/lib/python2.7 -f \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
/usr/local/lib/python2.7
Traceback (most recent call last):
File "/usr/local/lib/python2.7/compileall.py", line 17, in <module>
import struct
File "/usr/local/lib/python2.7/struct.py", line 1, in <module>
from _struct import *
ImportError: No module named _struct
make: *** [libinstall] Error 1
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Python 2.6 dependencies error installing python-sqlite2-2.5.5-1.1.i586.rpm jmp007 Linux - Newbie 1 02-11-2011 11:05 AM
mysql server installation erroe or yum error karuchua Linux - Newbie 3 06-02-2010 03:47 AM
Error in installation of YUM GROUPINSTALL command M.sam Linux - Software 3 05-10-2010 06:02 AM
Yum won't update Python Zeno McDohl Linux - Newbie 7 09-11-2008 03:04 PM
Problem with Python? Yum? Daenris Linux - Software 1 04-08-2005 10:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 12:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration