Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/usr/bin/emerge: No such file or directory
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
cayenne
l33t
l33t


Joined: 17 Oct 2002
Posts: 945
Location: New Orleans

PostPosted: Tue Jan 20, 2009 6:51 pm    Post subject: /usr/bin/emerge: No such file or directory Reply with quote

Hi all,

Ok...I blew it.
I'm on an OLD box...and was starting to update it. I tried emerge --sync...and it finally finished. It suggested I update portage and set a profile. I did the profile.

But when I tried emerge portage...it basically said the old version of portage was blocking bash upgrade with was part of the portage update.

I unmerged portage, to try to allow the emerge of the new one to work.

Now, I can't emerge.
:(

I thought I'd download a latest snapshot of portage, which I did, and unzipped it to /usr...trying to follow the directions for a new install, but, I apparently still have no emerge program.

Can someone help me figure out how to get emerge back again?

Thanks in advance,

cayenne
_________________
Light travels faster than sound. This is why some people appear bright until you hear them speak.........
Back to top
View user's profile Send private message
lxg
Veteran
Veteran


Joined: 12 Nov 2005
Posts: 1019
Location: Aachen, Germany

PostPosted: Tue Jan 20, 2009 7:05 pm    Post subject: Reply with quote

/usr/portage is just the package database.

I don't know if there's a state-of-the-art solution for this sort of problem, but I would try to get a binary .tar.bz2 package of sys-apps/portage, and unpack it into your tree. (However, you might get warnings about package collisions when emerging portage the next time, but I think there's a switch for the FEATURES variable to temporarily ignore file collisions.)
_________________
lxg.de – codebits and tech talk
Back to top
View user's profile Send private message
cayenne
l33t
l33t


Joined: 17 Oct 2002
Posts: 945
Location: New Orleans

PostPosted: Tue Jan 20, 2009 7:13 pm    Post subject: would this work? Reply with quote

lxg wrote:
/usr/portage is just the package database.

I don't know if there's a state-of-the-art solution for this sort of problem, but I would try to get a binary .tar.bz2 package of sys-apps/portage, and unpack it into your tree. (However, you might get warnings about package collisions when emerging portage the next time, but I think there's a switch for the FEATURES variable to temporarily ignore file collisions.)


I just thought of something.
Could I just pull /usr/bin/emerge off another box...and put it on this one and have it work?

C :?:
_________________
Light travels faster than sound. This is why some people appear bright until you hear them speak.........
Back to top
View user's profile Send private message
[n00b@localhost]
Apprentice
Apprentice


Joined: 30 Aug 2004
Posts: 266
Location: London, UK

PostPosted: Tue Jan 20, 2009 7:43 pm    Post subject: Reply with quote

cayenne wrote:
Could I just pull /usr/bin/emerge off another box...and put it on this one and have it work?


That wouldn't work. The portage package contains python modules that are used by the emerge command. Untarring the package as lxg suggested seems the best bet.
Back to top
View user's profile Send private message
TrueDFX
Retired Dev
Retired Dev


Joined: 02 Jun 2004
Posts: 1348

PostPosted: Tue Jan 20, 2009 7:58 pm    Post subject: Reply with quote

Make sure you get rid of /usr/lib/portage entirely. A partial installation of portage will hurt recovery.
Code:
rm -r /usr/lib/portage

Download the portage tarball. This isn't necessary if you have it in your DISTDIR already, of course.
Code:
wget http://distfiles.gentoo.org/distfiles/portage-2.1.6.tar.bz2

Unpack it.
Code:
tar xjf portage-2.1.6.tar.bz2

Install make.globals. It needs to be in /etc because portage won't find it otherwise, and it really needs it.
Code:
cd portage-2.1.6
cp cnf/make.globals /etc

Create a binpkg of portage.
Code:
bin/ebuild /usr/portage/sys-apps/portage/portage-2.1.6.7.ebuild clean package

Manually install it first, ...
Code:
cd /
tar xjpf /usr/portage/packages/sys-apps/portage-2.1.6.7.tar.bz2

...and use the manually installed portage to install portage properly.
Code:
emerge --oneshot --usepkgonly sys-apps/portage

Now portage should be installed properly again. There are probably other ways that take fewer steps, but this works here.
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2719
Location: here, there or in transit

PostPosted: Tue Jan 20, 2009 8:00 pm    Post subject: Reply with quote

See Manually fixing broken Portage installations.
(Referenced from FAQ Forum :arrow: Table of Contents :arrow: Gentoo Fundamentals :arrow: GF7: emerge doesn't work at all any more, what can I do?)

Moved from Portage & Programming to Duplicate Threads.
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
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