Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Uninstalled python, portage doesn't work now
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
ca_grover
Apprentice
Apprentice


Joined: 08 Jun 2003
Posts: 150
Location: Canada, Eh?

PostPosted: Thu Sep 15, 2005 9:41 pm    Post subject: Uninstalled python, portage doesn't work now Reply with quote

Don't I feel dumb. I removed python with "emerge -C python", and intended to emerge the ~x86 version right afterwards. Well, now when I try to do emerge I see this
Code:
bash: /usr/bin/emerge: /usr/bin/python: bad interpreter: No such file or directory


So, how do I fix this? Live CD and chroot? Doesn't this use the local file system, so would cause the same problem? Or maybe doing the Portage part of the installs again?

Thanks for any tips, cuz I'm stuck...
Back to top
View user's profile Send private message
FreeFly42
l33t
l33t


Joined: 03 Nov 2003
Posts: 848
Location: Houston, TX

PostPosted: Thu Sep 15, 2005 9:49 pm    Post subject: Reply with quote

You can get one of the installation stage -1 tarballs and unroll it on top of your existing installation. If you do so, you'll have to re-emerge a bunch of stuff. I don't recommend this approach, but it's simple.

Better: Get a stage -1 tarball and unroll it in a tmp dir. Copy usr/bin/python from it to /usr/bin. Repeat your emerge and copy any needed files from the tmp dir to the real dir. Once you have emerge working again, simply re-emerge python.

Oh and get a black magic marker and write on your screen:
"Don't ever emerge -C python"

put ~x86 in /etc/package.mask for python then simply emerge -ua python would have done what you wanted. "man emerge" is your friend.
_________________
Kent

Planes are dangerous, get out of 'em quick
Back to top
View user's profile Send private message
ca_grover
Apprentice
Apprentice


Joined: 08 Jun 2003
Posts: 150
Location: Canada, Eh?

PostPosted: Thu Sep 15, 2005 10:48 pm    Post subject: Reply with quote

Thanks for the quick response. After posting my message (knee jerk reaction), I did some more research on Google, and came up with this thread: https://forums.gentoo.org/viewtopic-t-62334-highlight-atexit.html. Down near the bottom of the page is a suggestion by ormi that has this:
Code:
1. reboot from livecd
 2. setup network
 3. mount hdxx to /mnt/gentoo
 4. untar tarball from livecd using xvjfk -options (k is important! it keeps old files.)
 5. chroot /mnt/gentoo /bin/bash (and the other things)
 6. emerge -u world


I'll be trying this out later.

Yep, I actually did set /etc/portage/packages.keywords for python to use the ~x86 flag. But when I did a practice emerge it indicated it would do a new install of python instead of updating the current version. That's what triggered all this - manually remove the old version then, and then install the new version so that I wouldn't have to worry about multiple installs.... er... don't don that.. :)

I'll report back with the results of the above....
Back to top
View user's profile Send private message
kimchi_sg
Advocate
Advocate


Joined: 26 Nov 2004
Posts: 2915
Location: Singapore

PostPosted: Thu Sep 15, 2005 11:55 pm    Post subject: Reply with quote

Duplicate of I unmerged python... ensuing problems....

Please look into the FAQ forum before posting.
_________________
Murphy's Law of Gentoo installation: If a compile can fail, it will.

MacGillicuddy's Corollary: At the most inopportune time.

Please search and read the FAQs before posting.
Back to top
View user's profile Send private message
ca_grover
Apprentice
Apprentice


Joined: 08 Jun 2003
Posts: 150
Location: Canada, Eh?

PostPosted: Fri Sep 16, 2005 4:32 am    Post subject: Reply with quote

I agree a search of the forums should be done for issues prior to posting. However, due to the simplistic search tool the Gentoo forums use, this does not always mean you'll find anything meaningful. Add to that, that when a person has to deal with a problem for the first time, they may not know what to search for. So, while I agree with the intent of your message (and do not mean to be argumentative), providing a helpful link is more productive than a simple RTFM statement so many other forums tend to do.

So, your message was appreciated (and I came across that thread anyways after more searching...). But, the forums should still have a better search capability to help minimize this type of problem. I DID search the forums first, but searched for the terms "emerge -C python", and "portage python", and nothing close to that thread showed up at first glance. Doing the same searches on Google, with the added keyword of "gentoo" yeilded much better results, surprisingly... I thought this one would be an obscure gentoo only problem.

In the meantime, I did manage to recover from this by following the steps I mentioned earlier. As a matter of fact, I don't think you need to do the chroot at all, if it's simply Python missing. Once you untar the stage (tar -xvjkf /mnt/cdrom/stages/stage3XXXX.tar.bz2 -C /mnt/gentoo), you have python again. You should be able to reboot at this point and run emerge (the first thing to do would be to do a proper emerge of python...).

Thanks for the tips...
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Fri Sep 16, 2005 4:34 am    Post subject: Reply with quote

Moved from Installing Gentoo to Duplicate Threads.
Use this thread instead: https://forums.gentoo.org/viewtopic.php?t=5746
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
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