Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Problem with python and emerge: 'No module named os'

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
49 posts
  • Previous
  • 1
  • 2
Author
Message
zgredek
Apprentice
Apprentice
Posts: 186
Joined: Wed Jun 15, 2005 8:59 pm

  • Quote

Post by zgredek » Fri Jan 08, 2010 11:57 pm

Mike Hunt wrote:Ok, get rid of that Python-2.6.4 folder, because it can interfere.
Also make sure that eselect python show = python2.6
and run python-updater

Code: Select all

# rm -rf Python-2.6.4
# eselect python show
python2.6

# python-updater 
Could not find platform independent libraries <prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/bin/portageq", line 22, in <module>
    import os
ImportError: No module named os
Top
Mike Hunt
Watchman
Watchman
User avatar
Posts: 5287
Joined: Sun Jul 19, 2009 11:01 pm

  • Quote

Post by Mike Hunt » Sat Jan 09, 2010 12:25 am

Hmmm, full circle.

You could try moving all those /usr/bin/python2.* to /usr/bin/python2.*.bogus and redo the python and portage fixes again.

Make sure you don't have any /usr/local/anything python
Top
zgredek
Apprentice
Apprentice
Posts: 186
Joined: Wed Jun 15, 2005 8:59 pm

  • Quote

Post by zgredek » Fri Jan 22, 2010 5:12 pm

None of these seems to help...

Is reinstall the only solution?
Top
d2_racing
Bodhisattva
Bodhisattva
User avatar
Posts: 13047
Joined: Mon Apr 25, 2005 2:25 pm
Location: Ste-Foy,Canada
Contact:
Contact d2_racing
Website

  • Quote

Post by d2_racing » Fri Jan 22, 2010 8:30 pm

If you have the time, it's the last resort solution.
Top
zgredek
Apprentice
Apprentice
Posts: 186
Joined: Wed Jun 15, 2005 8:59 pm

  • Quote

Post by zgredek » Sat Jan 23, 2010 3:38 pm

Seriously, there's nothing else I could do?

I've always thought Linux doesn't need reinstall no matter what...
Top
Mike Hunt
Watchman
Watchman
User avatar
Posts: 5287
Joined: Sun Jul 19, 2009 11:01 pm

  • Quote

Post by Mike Hunt » Sat Jan 23, 2010 5:33 pm

Normally it shouldn't be necessary.
Post your emerge --info please - you can. Maybe some clues there.
Otherwise you could also check in at bugs.gentoo.org before re-installing.
Top
d2_racing
Bodhisattva
Bodhisattva
User avatar
Posts: 13047
Joined: Mon Apr 25, 2005 2:25 pm
Location: Ste-Foy,Canada
Contact:
Contact d2_racing
Website

  • Quote

Post by d2_racing » Sat Jan 23, 2010 7:05 pm

In fact, we need to give it an another try :P
Top
Genone
Retired Dev
Retired Dev
User avatar
Posts: 9656
Joined: Fri Mar 14, 2003 6:02 pm
Location: beyond the rim

  • Quote

Post by Genone » Sat Jan 23, 2010 9:12 pm

The thing is, we still don't really know what's wrong, the suggestions so far have been mostly shots in the dark. There are a few things you could check though:
- is it a portage or a python problem? (if `python -c "import os"` generates an error it's a python problem)
- if it's a python problem (which we have assumed so far), is the "os" module really missing or is it just not found for some reason (look for "os.py" somewhere in /usr/lib*/python*/ )
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Sat Jan 23, 2010 9:38 pm

for older version of portage/python and eselect you should have
/usr/bin/python symlink to /usr/bin/python-versionyouuse

for newer
/usr/bin/python symlink to python-wrapper

And your output show that no /usr/bin/python exist.
zgredek wrote: Code:

Code: Select all

# ls -l /usr/bin/python* 
lrwxrwxrwx 1 root root    9 2010-01-08 23:48 /usr/bin/python2 -> python2.5
-rwxr-xr-x 1 root root 3280 2008-03-30 20:22 /usr/bin/python2.4
-rwxr-xr-x 1 root root 3280 2008-11-30 21:37 /usr/bin/python2.5
-rwxr-xr-x 1 root root 5352 2009-10-31 17:43 /usr/bin/python2.6
lrwxrwxrwx 1 root root    9 2009-12-24 01:52 /usr/bin/python3 -> python3.1
-rwxr-xr-x 1 root root 5384 2009-10-31 17:25 /usr/bin/python3.1
Check this out, this might not solve your problem (because you may have introduce new ones by tweaking everything), but still without that fix, you won't go anywhere.
Top
zgredek
Apprentice
Apprentice
Posts: 186
Joined: Wed Jun 15, 2005 8:59 pm

  • Quote

Post by zgredek » Sun Jan 24, 2010 12:34 am

emerge --info does not work but i somehow managed to make it print some info (but not emerge stuff) before.

Below is the kernel version + my make.conf, hope something pops out.

Code: Select all

# uname -a
Linux 2.6.24-gentoo-r3 #11 SMP Tue Apr 1 23:49:07 CEST 2008 i686 Intel(R) Core(TM)2 Duo CPU     E4500  @ 2.20GHz GenuineIntel GNU/Linux

Code: Select all

USE="X kde nptl nptlonly unicode -gtk -gnome alsa dri X xorg bzip2 directfb png gif jpeg tiff sse mmx mpeg oss truetype mysql spell djvu threads lm_sensors opengl xcomposite xscreensaver hal ieee1394 arts php apache2ftp gd soap xml xmlreader xmlrpc xmlwriter xsl zip mp3 alsa sensord svg esd tk xosd apache2 sse2 java cgi latex dbus cddb gimp pdf gtk cdparanoia dvd ftp v4l css dvdr dvdread ffmpeg vcd qt3 gadu highlight history statistics translator texteffect sms connectionstatus contactnotes cairo midi kdeenablefinal divx ruby sql subversion scanner usb imagemagick mng real vidix wavpack win32codecs xvmc qt4 vorbis bluetooth bash-completion"
CHOST="i686-pc-linux-gnu
CFLAGS="-march=pentium4 -O2 -pipe"
CXXFLAGS="${CFLAGS}"
ACCEPT_KEYWORDS="~x86"
PORTAGE_TMPDIR=/data/var/tmp
PORTDIR=/usr/portage
DISTDIR=${PORTDIR}/distfiles
PKGDIR=${PORTDIR}/packages
MAKEOPTS="-j2"
PORTAGE_NICENESS=0
AUTOCLEAN="yes"
FEATURES="parallel-fetch"
PORTAGE_ELOG_CLASSES="warn error log"
INPUT_DEVICES="keyboard mouse"
VIDEO_CARDS="fbdev i810 vga"
LINGUAS="en pl es ru ja en_GB"
SANE_BACKENDS="hp"
Genone wrote: - is it a portage or a python problem? (if `python -c "import os"` generates an error it's a python problem)
- if it's a python problem (which we have assumed so far), is the "os" module really missing or is it just not found for some reason (look for "os.py" somewhere in /usr/lib*/python*/ )

Code: Select all

# python -c "import os"
Could not find platform independent libraries <prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named os

Code: Select all

 # find /usr/ -name os.py
/usr/lib/python2.4/os.py
/usr/lib/openoffice/basis3.0/program/python-core-2.3.4/lib/os.py
/usr/lib/python2.5/os.py
/usr/lib/vmware/installer/python/lib/os.py
/usr/lib/python3.1/os.py
krinn wrote:for older version of portage/python and eselect you should have
/usr/bin/python symlink to /usr/bin/python-versionyouuse

for newer
/usr/bin/python symlink to python-wrapper

And your output show that no /usr/bin/python exist.
/usr/bin/python is in the path and points to python-wrapper

Code: Select all

# ls -l /usr/bin/python
lrwxrwxrwx 1 root root 14 2010-01-09 00:56 /usr/bin/python -> python-wrapper
Python wrapper prints:

Code: Select all

# python-wrapper -vv 
Could not find platform independent libraries <prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# trying /usr/lib/python2.6/site.so
# trying /usr/lib/python2.6/sitemodule.so
# trying /usr/lib/python2.6/site.py
# trying /usr/lib/python2.6/site.pyc
# trying /usr/lib/python2.6/lib-tk/site.so
# trying /usr/lib/python2.6/lib-tk/sitemodule.so
# trying /usr/lib/python2.6/lib-tk/site.py
# trying /usr/lib/python2.6/lib-tk/site.pyc
# trying /usr/lib/python2.6/lib-dynload/site.so
# trying /usr/lib/python2.6/lib-dynload/sitemodule.so
# trying /usr/lib/python2.6/lib-dynload/site.py
# trying /usr/lib/python2.6/lib-dynload/site.pyc
'import site' failed; traceback:
ImportError: No module named site
# trying /usr/lib/python2.6/encodings.so
# trying /usr/lib/python2.6/encodingsmodule.so
# trying /usr/lib/python2.6/encodings.py
# trying /usr/lib/python2.6/encodings.pyc
# trying /usr/lib/python2.6/lib-tk/encodings.so
# trying /usr/lib/python2.6/lib-tk/encodingsmodule.so
# trying /usr/lib/python2.6/lib-tk/encodings.py
# trying /usr/lib/python2.6/lib-tk/encodings.pyc
# trying /usr/lib/python2.6/lib-dynload/encodings.so
# trying /usr/lib/python2.6/lib-dynload/encodingsmodule.so
# trying /usr/lib/python2.6/lib-dynload/encodings.py
# trying /usr/lib/python2.6/lib-dynload/encodings.pyc
Python 2.6.4 (r264:75706, Oct 31 2009, 17:41:40) 
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
# trying readline.so
# trying readlinemodule.so
# trying readline.py
# trying readline.pyc
# trying /usr/lib/python2.6/readline.so
# trying /usr/lib/python2.6/readlinemodule.so
# trying /usr/lib/python2.6/readline.py
# trying /usr/lib/python2.6/readline.pyc
# trying /usr/lib/python2.6/lib-tk/readline.so
# trying /usr/lib/python2.6/lib-tk/readlinemodule.so
# trying /usr/lib/python2.6/lib-tk/readline.py
# trying /usr/lib/python2.6/lib-tk/readline.pyc
# trying /usr/lib/python2.6/lib-dynload/readline.so
dlopen("/usr/lib/python2.6/lib-dynload/readline.so", 2);
import readline # dynamically loaded from /usr/lib/python2.6/lib-dynload/readline.so
Current python version set:

Code: Select all

# eselect python list
Available python interpreters:
  [1]   python2.4
  [2]   python2.5
  [3]   python2.6 *
  [4]   python3.1
Top
Mike Hunt
Watchman
Watchman
User avatar
Posts: 5287
Joined: Sun Jul 19, 2009 11:01 pm

  • Quote

Post by Mike Hunt » Sun Jan 24, 2010 1:34 am

I would definitely try what krinn said:

Code: Select all

cd /usr/bin
ln -s python2.6 python
rm python2
ln -s python2.6 python2 
and try again: python -c "import os"
Top
Genone
Retired Dev
Retired Dev
User avatar
Posts: 9656
Joined: Fri Mar 14, 2003 6:02 pm
Location: beyond the rim

  • Quote

Post by Genone » Sun Jan 24, 2010 10:29 am

Mike Hunt wrote:I would definitely try what krinn said:

Code: Select all

cd /usr/bin
ln -s python2.6 python
rm python2
ln -s python2.6 python2 
and try again: python -c "import os"
Not going to work, as apparently his 2.6 install really lacks the "os" module for some reason. No idea what could cause that ("os" being one of the most important stdlib modules), esp. since he already remerged it.

@zgredek: If you're lucky your portage version might still work with python-2.5, so try selecting that with eselect and see if it helps (if not, try selecting 3.1, though I doubt that's going to work either). If you get portage working again we can try to figure out what's wrong with your python-2.6.
Top
zgredek
Apprentice
Apprentice
Posts: 186
Joined: Wed Jun 15, 2005 8:59 pm

  • Quote

Post by zgredek » Sun Jan 24, 2010 10:29 am

Mike Hunt wrote:I would definitely try what krinn said:

Code: Select all

cd /usr/bin
ln -s python2.6 python
rm python2
ln -s python2.6 python2 
and try again: python -c "import os"
Tried that and....

Code: Select all

# python -c "import os"
Could not find platform independent libraries <prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named os

Code: Select all

 # ls -l python python2
lrwxrwxrwx 1 root root 9 2010-01-24 11:30 python -> python2.6
lrwxrwxrwx 1 root root 9 2010-01-09 00:56 python2 -> python2.6
Genone wrote:
Mike Hunt wrote:I would definitely try what krinn said:

Code: Select all

cd /usr/bin
ln -s python2.6 python
rm python2
ln -s python2.6 python2 
and try again: python -c "import os"
Not going to work, as apparently his 2.6 install really lacks the "os" module for some reason. No idea what could cause that ("os" being one of the most important stdlib modules), esp. since he already remerged it.

@zgredek: If you're lucky your portage version might still work with python-2.5, so try selecting that with eselect and see if it helps (if not, try selecting 3.1, though I doubt that's going to work either). If you get portage working again we can try to figure out what's wrong with your python-2.6.
I already tried eselecting all the available versions - they all don't work at all...

UPDATE
I did:

Code: Select all

# rm /usr/bin/python
# ln -s python2.5 python
# python -c "import os"
#
# # emerge --info
Traceback (most recent call last):
  File "/usr/bin/emerge", line 31, in <module>
    import emergehelp, xpak, commands, errno, re, socket, string, time, types
  File "/usr/lib/portage/pym/emergehelp.py", line 5, in <module>
    import selinux
ImportError: No module named selinux
Now at least equery works :)
Top
Genone
Retired Dev
Retired Dev
User avatar
Posts: 9656
Joined: Fri Mar 14, 2003 6:02 pm
Location: beyond the rim

  • Quote

Post by Genone » Sun Jan 24, 2010 11:46 am

zgredek wrote:I already tried eselecting all the available versions - they all don't work at all...

UPDATE
I did:

Code: Select all

# rm /usr/bin/python
# ln -s python2.5 python
# python -c "import os"
#
# # emerge --info
Traceback (most recent call last):
  File "/usr/bin/emerge", line 31, in <module>
    import emergehelp, xpak, commands, errno, re, socket, string, time, types
  File "/usr/lib/portage/pym/emergehelp.py", line 5, in <module>
    import selinux
ImportError: No module named selinux
Now at least equery works :)
Yeah, that's a completely different problem as selinux isn't a standard module. You might be able to work around it by putting an empty selinux.py file in /usr/lib/python2.5/site-packages, and then remerge portage (IIRC it includes the selinux module).
Top
zgredek
Apprentice
Apprentice
Posts: 186
Joined: Wed Jun 15, 2005 8:59 pm

  • Quote

Post by zgredek » Sun Jan 24, 2010 12:59 pm

Genone wrote: Yeah, that's a completely different problem as selinux isn't a standard module. You might be able to work around it by putting an empty selinux.py file in /usr/lib/python2.5/site-packages, and then remerge portage (IIRC it includes the selinux module).
Find selinux.py returns nothing.

I never used selinux on that machine so I really don't know why emerge requires it.

Code: Select all

# emerge --info
Traceback (most recent call last):
  File "/usr/bin/emerge", line 31, in <module>
    import emergehelp, xpak, commands, errno, re, socket, string, time, types
  File "/usr/lib/portage/pym/emergehelp.py", line 6, in <module>
    from selinux import is_selinux_enabled
ImportError: cannot import name is_selinux_enabled
I checked and even in the downloaded and unpacked version of python there's no selinux module... Maybe some of You could prepare me a tarball with the missing files and/or complete /usr/lib/python2.x directory, or is that a bad idea?

I downloaded a version of selinux.py file from here: https://fedorahosted.org/system-config- ... format=txt and now emerge info returns:

Code: Select all

# emerge --info
Traceback (most recent call last):
  File "/usr/bin/emerge", line 31, in <module>
    import emergehelp, xpak, commands, errno, re, socket, string, time, types
  File "/usr/lib/portage/pym/emergehelp.py", line 5, in <module>
    import selinux
  File "/usr/lib/python2.5/selinux.py", line 26, in <module>
    import gtk
ImportError: No module named gtk
Maybe just the path is missing/wrong? python seems to find modules in /usr/lib/python2.5 but maybe that's incorrect?
Top
Mike Hunt
Watchman
Watchman
User avatar
Posts: 5287
Joined: Sun Jul 19, 2009 11:01 pm

  • Quote

Post by Mike Hunt » Sun Jan 24, 2010 1:32 pm

True that, sys-apps/portage owns (/usr/lib/portage/pym/portage_selinux.py).

Why not grab both a dev-lang/python and sys-apps/portage from tinderbox and untar them on /
Check the /usr/bin/python symlink again.

Then post your emerge --info.
Top
zgredek
Apprentice
Apprentice
Posts: 186
Joined: Wed Jun 15, 2005 8:59 pm

  • Quote

Post by zgredek » Sun Jan 24, 2010 2:32 pm

Mike Hunt wrote:True that, sys-apps/portage owns (/usr/lib/portage/pym/portage_selinux.py).

Why not grab both a dev-lang/python and sys-apps/portage from tinderbox and untar them on /
Check the /usr/bin/python symlink again.

Then post your emerge --info.

Code: Select all

# ls -l /usr/bin/python
lrwxrwxrwx 1 root root 14 2010-01-24 11:38 /usr/bin/python -> python-wrapper

Code: Select all

 # ./emerge --info
Portage 2.1.6.13 (default/linux/x86/10.0, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.24-gentoo-r3 i686)
=================================================================
System uname: Linux-2.6.24-gentoo-r3-i686-Intel-R-_Core-TM-2_Duo_CPU_____E4500__@_2.20GHz-with-glibc2.0
Timestamp of tree: Fri, 08 Jan 2010 22:30:01 +0000
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.4.4-r9, 2.5.2-r8, 3.1.1-r1
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.12.9
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.19
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=pentium4 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US"
LDFLAGS="-Wl,-O1"
LINGUAS="en pl es ru ja en_GB"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/data/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl alsa apache2 apache2ftp bash-completion berkdb bluetooth bzip2 cairo cddb cdparanoia cgi cli connectionstatus contactnotes cracklib crypt css cups cxx dbus directfb divx djvu dri dvd dvdr dvdread esd ffmpeg fortran ftp gadu gd gdbm gif gimp gpm gtk hal highlight history iconv ieee1394 imagemagick ipv6 java jpeg kde latex lm_sensors midi mmx mng modules mp3 mpeg mudflap mysql ncurses nls nptl nptlonly opengl openmp oss pam pcre pdf perl php png pppd python qt3 qt4 readline reflection ruby scanner sensord session sms soap spell spl sql sse sse2 ssl statistics subversion svg sysfs tcpd texteffect threads tiff tk translator truetype unicode usb v4l vcd vidix vorbis wavpack win32codecs x86 xcomposite xml xmlreader xmlrpc xmlwriter xorg xosd xscreensaver xsl xvmc zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en pl es ru ja en_GB" RUBY_TARGETS="ruby18" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="fbdev i810 vga"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
emerge --info, emerge -p works but trying to actually emerge something throws:

Code: Select all

Traceback (most recent call last):
  File "/usr/lib/portage/bin/ebuild", line 26, in <module>
    import portage, portage_util, portage_const
  File "/usr/lib/portage/pym/portage_util.py", line 5, in <module>
    import selinux
  File "/usr/lib/python2.5/selinux.py", line 26, in <module>
    import gtk
ImportError: No module named gtk
Just like before..
Top
Mike Hunt
Watchman
Watchman
User avatar
Posts: 5287
Joined: Sun Jul 19, 2009 11:01 pm

  • Quote

Post by Mike Hunt » Sun Jan 24, 2010 2:57 pm

The thing here is if you untared python-2.6.4.tbz2 on /
then your /usr/bin/python and /usr/bin/python2 should be using python2.6 not python2.5

try resetting that symlink manually, at least for now.
Top
zgredek
Apprentice
Apprentice
Posts: 186
Joined: Wed Jun 15, 2005 8:59 pm

  • Quote

Post by zgredek » Sun Jan 24, 2010 3:13 pm

Mike Hunt wrote:The thing here is if you untared python-2.6.4.tbz2 on /
then your /usr/bin/python and /usr/bin/python2 should be using python2.6 not python2.5

try resetting that symlink manually, at least for now.

Code: Select all

# ls -l /usr/bin/python{,2}
lrwxrwxrwx 1 root root 18 2010-01-24 16:05 /usr/bin/python -> /usr/bin/python2.5
lrwxrwxrwx 1 root root 18 2010-01-24 16:05 /usr/bin/python2 -> /usr/bin/python2.5
I successfully emerged something

What is my next step? :wink:
Top
Mike Hunt
Watchman
Watchman
User avatar
Posts: 5287
Joined: Sun Jul 19, 2009 11:01 pm

  • Quote

Post by Mike Hunt » Sun Jan 24, 2010 3:20 pm

A good start:
  • emerge --sync
  • emerge -e system
  • emerge -e world
  • perl-cleaner all
  • eselect python set python2.6
  • python-updater
  • etc-update
  • emerge --oneshot libtool
  • build and install updated gentoo-sources
  • emerge --depclean -av ***CAREFULLY***
  • revdep-rebuild
  • eclean-dist -d
Top
zgredek
Apprentice
Apprentice
Posts: 186
Joined: Wed Jun 15, 2005 8:59 pm

  • Quote

Post by zgredek » Sun Jan 24, 2010 3:31 pm

Mike Hunt wrote:A good start:
  • emerge --sync
Last time emerge --sync broke my portage, so I'm not sure I want to fix it again..
Top
Mike Hunt
Watchman
Watchman
User avatar
Posts: 5287
Joined: Sun Jul 19, 2009 11:01 pm

  • Quote

Post by Mike Hunt » Sun Jan 24, 2010 3:55 pm

You must have a proper emerge --sync.
Go ahead and try it. :)

Report back whatever happens.
Top
Genone
Retired Dev
Retired Dev
User avatar
Posts: 9656
Joined: Fri Mar 14, 2003 6:02 pm
Location: beyond the rim

  • Quote

Post by Genone » Sun Jan 24, 2010 11:14 pm

Just for completeness, remove the selinux.py you got from fedora, it's a completely different thing than what portage uses.
Top
Genone
Retired Dev
Retired Dev
User avatar
Posts: 9656
Joined: Fri Mar 14, 2003 6:02 pm
Location: beyond the rim

  • Quote

Post by Genone » Mon Jan 25, 2010 7:38 am

Oh, and I'd recommend runnning a filesystem check, as for now I can think of only two ways for os.py to become missing: user error or filesystem corruption, and if it really happened during a --sync than it's probably the latter.
Top
Post Reply

49 posts
  • Previous
  • 1
  • 2

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic