Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I unmerged python... ensuing problems....
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Tortue
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2005
Posts: 75
Location: Gatineau (Québec), Canada

PostPosted: Mon Sep 08, 2008 9:02 pm    Post subject: Reply with quote

Thanks a lot delta407, you saved not only my day, but also my month!

You also have a place to stay in the Ottawa area!
_________________
"La vie est un formidable scénariste"
- Le cinéaste Bertrand Tavernier, citant un ami
Back to top
View user's profile Send private message
mgillespie
Apprentice
Apprentice


Joined: 16 Dec 2003
Posts: 170

PostPosted: Fri Nov 07, 2008 1:13 am    Post subject: Unmerged Python (as it was blocking packages) - problems!!! Reply with quote

My trusty Gentoo server is busted. I did a emerge -Upd world, and there were some blocks. In the past, I just umerged what was blocking them, and it carried on and sorted things out.

This time not so, firstly I had major problems with libcom_err.so.1, which got removed gy e2fsprogs, which broke wget., I finally sorted that mess out, by pulling the box out, installing a CD drive (it's a headless, CD-less, keyboard less server), booting usin a livecd and copying the missing stuff over so it could boot again.

Now all I have to do, is fix the missing Python. Anyone got any advice? (aside from move to much less painful apt-get and Ubuntu).
Back to top
View user's profile Send private message
Zepp
Veteran
Veteran


Joined: 15 Mar 2004
Posts: 1246
Location: Ontario, Canada

PostPosted: Fri Nov 07, 2008 1:45 am    Post subject: Reply with quote

manually grab the python source tar ball, extract, compile, and install it. then hopefully you can run emerge again and can remerge python and run python-updater.
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2598

PostPosted: Fri Nov 07, 2008 2:06 am    Post subject: Reply with quote

You should still have web access, it is just that wget and portage are broken. So, you can just go to any of the local mirrors close to you:

http://www.gentoo.org/main/en/mirrors.xml

and go the distfiles folder. Get python and manually copy it into your /usr/portage/distfiles folder. However, as Portage itself uses Python, you will most likely have to do as Zepp suggested, and manually install python. Then once python is installed, you can do a system update via emerge -avuDN world, and run the updater script and revdep-rebuild.
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
tarpman
Veteran
Veteran


Joined: 04 Nov 2004
Posts: 1083
Location: Victoria, BC, Canada

PostPosted: Fri Nov 07, 2008 3:20 am    Post subject: Reply with quote

A Python compiled from scratch won't necessarily work with portage, as Gentoo applies a number of patches and fixes to it. A better approach would be to grab a binary package from here. You can simply unpack it at / to get portage working temporarily, and then rebuild python locally once it's up.
_________________
Saving the world, one kilobyte at a time.
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Fri Nov 07, 2008 5:26 am    Post subject: Reply with quote

mgillespie wrote:
My trusty Gentoo server is busted. I did a emerge -Upd world, and there were some blocks. In the past, I just umerged what was blocking them, and it carried on and sorted things out.
The 2.2 series introduces to portage the ability to automatically resolve the most common cases of such problems.
mgillespie wrote:
This time not so, firstly I had major problems with libcom_err.so.1, which got removed gy e2fsprogs, which broke wget., I finally sorted that mess out, by pulling the box out, installing a CD drive (it's a headless, CD-less, keyboard less server), booting usin a livecd and copying the missing stuff over so it could boot again.
When you encounter blocks involving packages which are known to be vital, or just appear to be so, use the --fetchonly (-f) or --fetch-all-uri (-F) options to emerge to retrieve all of the necessary files before proceeding with removing any packages.
mgillespie wrote:
Now all I have to do, is fix the missing Python. Anyone got any advice?
With the tendency to stick to things comes the concern of what to stick to, without it comes the concern of where to fall from. As for more pertinent advice, I posted it some time ago.
mgillespie wrote:
(aside from move to much less painful apt-get and Ubuntu).
They break too, and they can be more difficult to fix without simply reverting everything.

Merged the above four posts.
Back to top
View user's profile Send private message
BadSquishy
n00b
n00b


Joined: 17 Jun 2005
Posts: 44
Location: Northern California

PostPosted: Fri Nov 07, 2008 6:49 am    Post subject: unmerged python, portage broken (fixed) Reply with quote

I made the same rookie mistake, saw a blocking package and ran "emerge -C python". I saw that it was removing more than one slot and thought "that probably isn't right" but didn't hit CTRL+C immediately like I should have.

tarpman's post just above is what saved my bacon. Though now I am thinking it will be hard for me to determine if I'm leaving a bunch of extra files on my system.

I unpacked the python-2.4.4-r13.tbz2 tarball in the / directory after checking that it wasn't going to overwrite anything unexpected. After that I emerged dev-lang/python which installed python-2.5. At this point I knew I had python-2.4 on my system but portage didn't know about it ("equery l python" only showed 2.5 installed) so I emerged python-2.4.4-r14. Now I am going to run python-updater to make everything work with python-2.5, check to see if there are any packages depending on python 2.4 with equery, and if not I will unmerge python-2.4. Then I will manually check the file system to see if any of the files that were originally in the tarball are left.

Damn - python-updater won't work because some of my packages are so out of date they are now masked in the portage tree. I have to run emerge -avuDN world first (did I mention I updated to a new profile at the request of portage just before I made my big mistake?). So know I have to wait for it to update 49 packages before I can run python-updater (I could have just updated the packages that python-updater cared about, but hey, why not take unnecessary chances?). I'm still leaving fixed on the end of this post because emerge IS working.

Another method that is slightly different than tarpman's post is the post desultory has referred to several times in this thread. It may be a little cleaner, but I don't really know.
_________________
- BadSquishy
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Fri Nov 07, 2008 7:55 am    Post subject: Reply with quote

BadSquishy wrote:
Another method that is slightly different than tarpman's post is the post desultory has referred to several times in this thread. It may be a little cleaner, but I don't really know.
It helps keep the orphan population down while keeping the package manager aware of the installed version during the maximum feasible portion of the process, in short it is cleaner.
Back to top
View user's profile Send private message
mgillespie
Apprentice
Apprentice


Joined: 16 Dec 2003
Posts: 170

PostPosted: Fri Nov 07, 2008 8:30 pm    Post subject: Reply with quote

tarpman wrote:
A Python compiled from scratch won't necessarily work with portage, as Gentoo applies a number of patches and fixes to it. A better approach would be to grab a binary package from here. You can simply unpack it at / to get portage working temporarily, and then rebuild python locally once it's up.


Does not work for me, I get "illegal instruction", after downloading to the / and doing tar -xvjf pythonxxx.tbz2

I wonder if these were compiled with i686 or i386??? I have Via Eden chipset, which does not have CMOV instruction...

Compiling from source has worked, off to emerge the proper python now... then sort out e2fsprogs proper, and then back the original updating before it all went pear shaped...
Back to top
View user's profile Send private message
Minthos
n00b
n00b


Joined: 04 Feb 2005
Posts: 9
Location: Norway

PostPosted: Wed Nov 26, 2008 2:04 pm    Post subject: Reply with quote

Doesen't work for me either: after unzipping the binary package into / and updating the symlink, I can run emerge but with several errors:

The unzipping gives me this, but otherwise seems to work fine:
Code:
bzip2: (stdin): trailing garbage after EOF ignored


First I try # emerge -K dev-lang/python and get this:
Code:

Calculating dependencies /
emerge: there are no ebuilds to satisfy "dev-lang/python".


Then I emerge python without the -K and during emerge I get lots of these:

Code:

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/lib64/portage/bin/filter-bash-environment.py", line 6, in <module>
    import os, re, sys
ImportError: No module named os


Then when trying emerge -K dev-lang/python again, I now get this:

Code:

Calculating dependencies /
!!! All ebuilds that could satisfy "dev-lang/python" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-lang/python-2.5.2-r7 (masked by: invalid: SLOT is undefined)

For more information, see MASKED PACKAGES section in the emerge man page or
refer to the Gentoo Handbook.


So python itself works, but it can't find any libraries:
Code:

$ python
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Python 2.6 (r26:66714, Nov 26 2008, 13:48:24)
[GCC 4.1.2 20070214 (  (gdc 0.24, using dmd 1.020)) (Gentoo 4.1.2 p1.0.2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> help
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'help' is not defined
>>>
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Thu Nov 27, 2008 7:38 am    Post subject: Reply with quote

Minthos wrote:
The unzipping gives me this, but otherwise seems to work fine:
Code:
bzip2: (stdin): trailing garbage after EOF ignored
As previously mentioned, that is expected and harmless.
Minthos wrote:
First I try # emerge -K dev-lang/python and get this:
Code:

Calculating dependencies /
emerge: there are no ebuilds to satisfy "dev-lang/python".
According to that there were no python packages present in PKGDIR, rectify that and try again.
Back to top
View user's profile Send private message
Minthos
n00b
n00b


Joined: 04 Feb 2005
Posts: 9
Location: Norway

PostPosted: Sat Dec 06, 2008 7:28 am    Post subject: Reply with quote

Code:
rm -r /usr/local/bin/python*

This fixed everything.

edit: Well, except pygtk, which is still hosed and won't reinstall properly. Will return with update on that later..
Back to top
View user's profile Send private message
Minthos
n00b
n00b


Joined: 04 Feb 2005
Posts: 9
Location: Norway

PostPosted: Sat Dec 06, 2008 12:21 pm    Post subject: Reply with quote

So I ran python-updater and emerged "manually" i.e. by typing emerge -av <package> some of the packages it choked on - which was a bit weird btw: python-updater whined about masked packages and whatnot, but when I told emerge to get them, there were no complaints.

I also manually removed python 2.4 at some point (unintentionally removing 2.5 too, but I fixed that by re-extracting the tarball I used earlier). This caused python-updater to become a bit confused, so I gave it the -o 2.4 option. A while later, libpng failed to emerge. I tried emerge --resume --skipfirst, and got a similar error on the next package. I tried the next package after that too, for good measure, but same error.

I may have tried to reemerge some already installed packages, but I don't remember the specifics. The point is, I reemerge portage, and this is what happens:

Code:

 # emerge -av portage

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sys-apps/portage-2.1.4.5  USE="-build -doc -epydoc (-selinux)" LINGUAS="-pl" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No] yes
>>> Verifying ebuild Manifests...

>>> Emerging (1 of 1) sys-apps/portage-2.1.4.5 to /
 * portage-2.1.4.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                           [ ok ]
 * portage-2.1.4.5.patch.bz2 RMD160 SHA1 SHA256 size ;-) ...                                       [ ok ]
 * checking ebuild checksums ;-) ...                                                               [ ok ]
 * checking auxfile checksums ;-) ...                                                              [ ok ]
 * checking miscfile checksums ;-) ...                                                             [ ok ]
 * checking portage-2.1.4.tar.bz2 ;-) ...                                                          [ ok ]
 * checking portage-2.1.4.5.patch.bz2 ;-) ...                                                      [ ok ]
libsandbox:  Can't resolve fopen: (null)
>>> Unpacking source...
>>> Unpacking portage-2.1.4.tar.bz2 to /var/tmp/portage/sys-apps/portage-2.1.4.5/work
>>> Unpacking portage-2.1.4.5.patch.bz2 to /var/tmp/portage/sys-apps/portage-2.1.4.5/work
 * Applying portage-2.1.4.5.patch ...                                                              [ ok ]
 * Setting portage.VERSION to 2.1.4.5 ...                                                          [ ok ]
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/sys-apps/portage-2.1.4.5/work/portage-2.1.4 ...
>>> Source compiled.
>>> Test phase [not enabled]: sys-apps/portage-2.1.4.5
libsandbox:  Can't resolve open: (null)
libsandbox:  Can't resolve fopen64: (null)

>>> Install portage-2.1.4.5 into /var/tmp/portage/sys-apps/portage-2.1.4.5/image/ category sys-apps
>>> Completed installing portage-2.1.4.5 into /var/tmp/portage/sys-apps/portage-2.1.4.5/image/

!!! WARNING: Expected SLOT='0', got ''
* checking 0 files for package collisions
>>> Merging sys-apps/portage-2.1.4.5 to /
>>> Safely unmerging already-installed instance...
No package files given... Grabbing a set.
<<<          obj /usr/share/man/man5/portage.5.bz2
<<<          obj /usr/share/man/man5/make.conf.5.bz2
<<<          obj /usr/share/man/man5/ebuild.5.bz2
<<<          obj /usr/share/man/man5/color.map.5.bz2
<<<          obj /usr/share/man/man1/repoman.1.bz2
<<<          obj /usr/share/man/man1/quickpkg.1.bz2
<<<          obj /usr/share/man/man1/etc-update.1.bz2
<<<          obj /usr/share/man/man1/env-update.1.bz2
<<<          obj /usr/share/man/man1/emerge.1.bz2
<<<          obj /usr/share/man/man1/emaint.1.bz2
<<<          obj /usr/share/man/man1/ebuild.1.bz2
<<<          obj /usr/share/man/man1/dispatch-conf.1.bz2
<<<          obj /usr/share/doc/portage-2.1.4.5/RELEASE-NOTES.bz2
<<<          obj /usr/share/doc/portage-2.1.4.5/NEWS.bz2
<<<          obj /usr/share/doc/portage-2.1.4.5/ChangeLog.bz2
<<<          sym /usr/sbin/update-etc
<<<          sym /usr/sbin/update-env
<<<          sym /usr/sbin/regenworld
<<<          sym /usr/sbin/quickpkg
<<<          sym /usr/sbin/fixpackages
<<<          sym /usr/sbin/etc-update
<<<          sym /usr/sbin/env-update
<<<          sym /usr/sbin/emerge-webrsync
<<<          sym /usr/sbin/emaint
<<<          sym /usr/sbin/dispatch-conf
<<<          sym /usr/sbin/archive-conf
<<<          obj /usr/lib64/portage/pym/xpak.py
<<<          obj /usr/lib64/portage/pym/portage_versions.py
<<<          obj /usr/lib64/portage/pym/portage_util.py
<<<          obj /usr/lib64/portage/pym/portage_update.py
<<<          obj /usr/lib64/portage/pym/portage_selinux.py
<<<          obj /usr/lib64/portage/pym/portage_manifest.py
<<<          obj /usr/lib64/portage/pym/portage_mail.py
<<<          obj /usr/lib64/portage/pym/portage_locks.py
<<<          obj /usr/lib64/portage/pym/portage_localization.py
<<<          obj /usr/lib64/portage/pym/portage_gpg.py
<<<          obj /usr/lib64/portage/pym/portage_exec.py
<<<          obj /usr/lib64/portage/pym/portage_exception.py
<<<          obj /usr/lib64/portage/pym/portage_dep.py
<<<          obj /usr/lib64/portage/pym/portage_debug.py
<<<          obj /usr/lib64/portage/pym/portage_data.py
<<<          obj /usr/lib64/portage/pym/portage_const.py
<<<          obj /usr/lib64/portage/pym/portage_checksum.py
<<<          obj /usr/lib64/portage/pym/portage.py
<<<          obj /usr/lib64/portage/pym/output.py
<<<          obj /usr/lib64/portage/pym/getbinpkg.py
<<<          obj /usr/lib64/portage/pym/emergehelp.py
<<<          obj /usr/lib64/portage/pym/elog_modules/mod_syslog.py
<<<          obj /usr/lib64/portage/pym/elog_modules/mod_save_summary.py
<<<          obj /usr/lib64/portage/pym/elog_modules/mod_save.py
<<<          obj /usr/lib64/portage/pym/elog_modules/mod_mail_summary.py
<<<          obj /usr/lib64/portage/pym/elog_modules/mod_mail.py
<<<          obj /usr/lib64/portage/pym/elog_modules/mod_echo.py
<<<          obj /usr/lib64/portage/pym/elog_modules/mod_custom.py
<<<          obj /usr/lib64/portage/pym/elog_modules/__init__.py
<<<          obj /usr/lib64/portage/pym/eclass_cache.py
<<<          obj /usr/lib64/portage/pym/dispatch_conf.py
<<<          obj /usr/lib64/portage/pym/cvstree.py
<<<          obj /usr/lib64/portage/pym/cache/volatile.py
<<<          obj /usr/lib64/portage/pym/cache/util.py
<<<          obj /usr/lib64/portage/pym/cache/template.py
<<<          obj /usr/lib64/portage/pym/cache/sqlite.py
<<<          obj /usr/lib64/portage/pym/cache/sql_template.py
<<<          obj /usr/lib64/portage/pym/cache/metadata_overlay.py
<<<          obj /usr/lib64/portage/pym/cache/metadata.py
<<<          obj /usr/lib64/portage/pym/cache/mappings.py
<<<          obj /usr/lib64/portage/pym/cache/fs_template.py
<<<          obj /usr/lib64/portage/pym/cache/flat_list.py
<<<          obj /usr/lib64/portage/pym/cache/flat_hash.py
<<<          obj /usr/lib64/portage/pym/cache/cache_errors.py
<<<          obj /usr/lib64/portage/pym/cache/anydbm.py
<<<          obj /usr/lib64/portage/pym/cache/__init__.py
<<<          obj /usr/lib64/portage/bin/xpak
<<<          obj /usr/lib64/portage/bin/tbz2tool
<<<          obj /usr/lib64/portage/bin/repoman
<<<          obj /usr/lib64/portage/bin/regenworld
<<<          obj /usr/lib64/portage/bin/quickpkg
<<<          obj /usr/lib64/portage/bin/prepstrip
<<<          obj /usr/lib64/portage/bin/prepman
<<<          obj /usr/lib64/portage/bin/preplib
<<<          obj /usr/lib64/portage/bin/prepinfo
<<<          obj /usr/lib64/portage/bin/prepallstrip
<<<          obj /usr/lib64/portage/bin/prepallman
<<<          obj /usr/lib64/portage/bin/prepallinfo
<<<          obj /usr/lib64/portage/bin/prepalldocs
<<<          obj /usr/lib64/portage/bin/prepall
<<<          obj /usr/lib64/portage/bin/portageq
<<<          obj /usr/lib64/portage/bin/portage_gpg_update.sh
<<<          obj /usr/lib64/portage/bin/pkgname
<<<          obj /usr/lib64/portage/bin/newsbin
<<<          obj /usr/lib64/portage/bin/newman
<<<          obj /usr/lib64/portage/bin/newlib.so
<<<          obj /usr/lib64/portage/bin/newlib.a
<<<          obj /usr/lib64/portage/bin/newins
<<<          obj /usr/lib64/portage/bin/newinitd
<<<          obj /usr/lib64/portage/bin/newexe
<<<          obj /usr/lib64/portage/bin/newenvd
<<<          obj /usr/lib64/portage/bin/newdoc
<<<          obj /usr/lib64/portage/bin/newconfd
<<<          obj /usr/lib64/portage/bin/newbin
<<<          obj /usr/lib64/portage/bin/misc-functions.sh
<<<          obj /usr/lib64/portage/bin/md5check.sh
<<<          obj /usr/lib64/portage/bin/md5check.py
<<<          obj /usr/lib64/portage/bin/isolated-functions.sh
<<<          obj /usr/lib64/portage/bin/fperms
<<<          obj /usr/lib64/portage/bin/fowners
<<<          obj /usr/lib64/portage/bin/fixpackages
<<<          obj /usr/lib64/portage/bin/fixdbentries
<<<          obj /usr/lib64/portage/bin/fix-db.py
<<<          obj /usr/lib64/portage/bin/find-requires
<<<          obj /usr/lib64/portage/bin/filter-bash-environment.py
<<<          obj /usr/lib64/portage/bin/etc-update
<<<          obj /usr/lib64/portage/bin/env-update.sh
<<<          obj /usr/lib64/portage/bin/env-update
<<<          obj /usr/lib64/portage/bin/emerge-webrsync
<<<          obj /usr/lib64/portage/bin/emerge
<<<          obj /usr/lib64/portage/bin/emake
<<<          obj /usr/lib64/portage/bin/emaint
<<<          obj /usr/lib64/portage/bin/ecompressdir
<<<          obj /usr/lib64/portage/bin/ecompress
<<<          obj /usr/lib64/portage/bin/ebuild.sh
<<<          obj /usr/lib64/portage/bin/ebuild
<<<          obj /usr/lib64/portage/bin/dosym
<<<          obj /usr/lib64/portage/bin/dosed
<<<          obj /usr/lib64/portage/bin/dosbin
<<<          sym /usr/lib64/portage/bin/donewins
<<<          obj /usr/lib64/portage/bin/domo
<<<          obj /usr/lib64/portage/bin/doman
<<<          obj /usr/lib64/portage/bin/dolib.so
<<<          obj /usr/lib64/portage/bin/dolib.a
<<<          obj /usr/lib64/portage/bin/dolib
<<<          obj /usr/lib64/portage/bin/doins
<<<          obj /usr/lib64/portage/bin/doinitd
<<<          obj /usr/lib64/portage/bin/doinfo
<<<          obj /usr/lib64/portage/bin/dohtml
<<<          obj /usr/lib64/portage/bin/dohard
<<<          obj /usr/lib64/portage/bin/doexe
<<<          obj /usr/lib64/portage/bin/doenvd
<<<          obj /usr/lib64/portage/bin/dodoc
<<<          obj /usr/lib64/portage/bin/dodir
<<<          obj /usr/lib64/portage/bin/doconfd
<<<          obj /usr/lib64/portage/bin/dobin
<<<          obj /usr/lib64/portage/bin/dispatch-conf
<<<          obj /usr/lib64/portage/bin/clean_locks
<<<          obj /usr/lib64/portage/bin/chkcontents
<<<          obj /usr/lib64/portage/bin/check-implicit-pointer-usage.py
<<<          obj /usr/lib64/portage/bin/archive-conf
<<<          sym /usr/bin/xpak
<<<          sym /usr/bin/tbz2tool
<<<          sym /usr/bin/repoman
<<<          sym /usr/bin/portageq
<<<          sym /usr/bin/emerge
<<<          sym /usr/bin/ebuild
<<<          obj /etc/portage/.keep_sys-apps_portage-0
<<<          obj /etc/make.globals
--- !mtime   obj /etc/make.conf.example
<<<          obj /etc/logrotate.d/elog-save-summary
<<<          obj /etc/etc-update.conf
<<<          obj /etc/env.d/05portage.envd
<<<          obj /etc/dispatch-conf.conf
--- !empty   dir /usr/share/man/man5
--- !empty   dir /usr/share/man/man1
--- !empty   dir /usr/share/man
<<<          dir /usr/share/doc/portage-2.1.4.5
--- !empty   dir /usr/share/doc
--- !empty   dir /usr/share
--- !empty   dir /usr/sbin
--- !empty   dir /usr/lib64/portage/pym/elog_modules
--- !empty   dir /usr/lib64/portage/pym/cache
--- !empty   dir /usr/lib64/portage/pym
--- !empty   dir /usr/lib64/portage/bin
--- !empty   dir /usr/lib64/portage
--- !empty   dir /usr/lib64
--- !empty   dir /usr/bin
--- !empty   dir /usr
--- !empty   dir /etc/portage
--- !empty   dir /etc/logrotate.d
--- !empty   dir /etc/env.d
--- !empty   dir /etc
>>> Original instance of package unmerged safely.
>>> sys-apps/portage-2.1.4.5 merged.

>>> No packages selected for removal by clean
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.
 * Regenerating GNU info directory index...
 * IMPORTANT: 15 config files in '/etc' need updating.
 * See the CONFIGURATION FILES section of the emerge
 * man page to learn how to update config files.


Looks pretty innocent, except for a few warnings/errors that fly past:
Code:

libsandbox:  Can't resolve open: (null)
libsandbox:  Can't resolve fopen64: (null)
!!! WARNING: Expected SLOT='0', got ''

No biggie, portage completes successfully, and lo and behold: portage is unmerged.
Code:
 # python-updater
/usr/sbin/python-updater: line 156: /usr/bin/portageq: No such file or directory
 # emerge
bash: /usr/bin/emerge: No such file or directory


Removing sandbox from FEATURES and running the portage rescue script again got me back on track. Will post more updates later..
Back to top
View user's profile Send private message
Minthos
n00b
n00b


Joined: 04 Feb 2005
Posts: 9
Location: Norway

PostPosted: Tue Dec 09, 2008 3:55 am    Post subject: Reply with quote

Yep, stuff seems to work now, including pygtk. python-updater completed successfully. I've had to reemerge some packages, but there have been no problems beyond that.
Back to top
View user's profile Send private message
esbenandreasen
n00b
n00b


Joined: 03 Nov 2008
Posts: 14

PostPosted: Mon Mar 09, 2009 2:35 pm    Post subject: Reply with quote

I were lucky - had another version installed.
Code:

/usr/bin % cd /usr/bin
/usr/bin % ls -l | grep python                                           
lrwxrwxrwx  1 root   root          9 Mar  6 19:19 python -> python2.5
lrwxrwxrwx  1 root   root         17 Mar  6 19:19 python-config -> python-config-2.5
-rwxr-xr-x  1 root   root       1.4K Mar  6 19:19 python-config-2.4
lrwxrwxrwx  1 root   root          9 Mar  6 19:19 python2 -> python2.5
-rwxr-xr-x  1 root   root       5.3K Mar  6 19:19 python2.4

All I had to do was to relink:
Code:

/usr/bin % rm python2
/usr/bin % rm python
/usr/bin % rm python-config
/usr/bin % ln -s /usr/bin/python2 /usr/bin/python-2.4
/usr/bin % ln -s /usr/bin/python /usr/bin/python-2.4
/usr/bin % ln -s /usr/bin/python-config-2.4 /usr/bin/python-config
Back to top
View user's profile Send private message
xvan
n00b
n00b


Joined: 31 Aug 2008
Posts: 2

PostPosted: Sun Jul 05, 2009 4:32 am    Post subject: Reply with quote

A quick and dirty way to restore python, that worked for me was to download the stage1 from mirrors. and make a
tar xvjkpf stage1*.tar.bz2
with the k option doesn't allow to overwrite anything, so at least it shouldn't be lethal.
It also installed other files, but i think its because I used a different stage version.
Now I have some digest issues when emerging python, but a portage resync should solve them.
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Sun Jul 05, 2009 5:36 am    Post subject: Reply with quote

You could save time and bandwidth while avoiding leaving orphans around the system.
Back to top
View user's profile Send private message
ahu
n00b
n00b


Joined: 22 Feb 2005
Posts: 10
Location: Austria

PostPosted: Wed Jun 30, 2010 9:02 pm    Post subject: Reply with quote

delta407 wrote:
You might be able to reinstall Python using this:

Code:
# cd
# tar xzf /usr/portage/distfiles/Python-2.2.1.tgz
# cd Python-2.2.1
# ./configure --with-fpectl --infodir=/usr/share/info/ --mandir=/usr/share/man
# make
# make install prefix=/usr
# rm /usr/bin/python 2>/dev/null
# ln -s /usr/bin/python2 /usr/bin/python


Hopefully this will be enough of Python to let you "emerge python" again.


delta407, you're my hero of the day!

After killing my python installation (dev-lang/python-2.6.5-r2) I could recover it with your instructions.

Thanks a lot
Alex
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum