Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I managed to kill my shell via removing coreutils [SOLVED]
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
scumm_boy
n00b
n00b


Joined: 08 Jan 2007
Posts: 30

PostPosted: Thu Jan 24, 2008 3:46 pm    Post subject: I managed to kill my shell via removing coreutils [SOLVED] Reply with quote

After the my latest emerge --sync I got:

Code:
[blocks B     ] sys-apps/mktemp (is blocking sys-apps/coreutils-6.10-r1)
[blocks B     ] >=sys-apps/coreutils-6.10 (is blocking sys-apps/mktemp-1.5)


I didn't have any coffee in my system so I stupidly typed:

Code:
emerge --unmerge mktemp coreutils


and found that I can no longer do pretty much anything. CD, WGET and TAR all work, but LS and RM don't.

Is there a binary package of coreutils that I can download? Or do I have to boot the system from a LiveCD and emerge coretuils again? I'm not on-site with the machine currently, so a binary package would be excellent.

Thanks.


Last edited by scumm_boy on Thu Jan 24, 2008 5:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2534
Location: In the city of the dreaming spires

PostPosted: Thu Jan 24, 2008 4:14 pm    Post subject: Reply with quote

This is a coreutils package for plain i686:
http://demandiseineseite.gmxhome.de/bin/coreutils-6.9-r1.tbz2
Just unpacking it and exporting the ./bin folder to your PATH should enable you to emerge coreutils. There should be several threads around for resolving cyclic blocker bugs, also have a look at the Gentoo Handbook.

EDIT: If you have ABI problems ("*.so.x.y not found" or suchlike) let me know and I'll compile a static version.

EDIT2: Just discovered that coreutils-6.10 and greater don't need mktemp any more, so just unmerge that.


Last edited by Voltago on Thu Jan 24, 2008 4:18 pm; edited 2 times in total
Back to top
View user's profile Send private message
karmaking
n00b
n00b


Joined: 11 Feb 2004
Posts: 74
Location: Berlin, Germany

PostPosted: Thu Jan 24, 2008 4:15 pm    Post subject: Reply with quote

There is no coreutils-binary or anything like it. A LiveCD would definitely be the way to go now.

As also commands like cp, chmod, echo, cat etc. are missing on your brick now, I doubt you could install a binary package anyway.

Maybe try to copy over the most important command files from a live CD or another Linux box, pray that they'll work and try until you can re-emerge coreutils again.

Code:
equery files coreutils
on a healthy Gentoo box (with gentoolkit installed) gives you a list of the commands that you are missing now.

Good luck :)
Daniel
[/quote]
Back to top
View user's profile Send private message
scumm_boy
n00b
n00b


Joined: 08 Jan 2007
Posts: 30

PostPosted: Thu Jan 24, 2008 4:19 pm    Post subject: Reply with quote

Okay. It'll have to sit there lobotomized until I get home then :)
Back to top
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2534
Location: In the city of the dreaming spires

PostPosted: Thu Jan 24, 2008 4:22 pm    Post subject: Reply with quote

scumm_boy wrote:
Okay. It'll have to sit there lobotomized until I get home then :)

Well no, not when you still got remote access and can use wget and tar. You don't need to install anything, just unpack, add the tools to PATH, and you're done. Only then you have to install coreutils, which should work again.
Back to top
View user's profile Send private message
scumm_boy
n00b
n00b


Joined: 08 Jan 2007
Posts: 30

PostPosted: Thu Jan 24, 2008 4:25 pm    Post subject: Reply with quote

Sorry, Voltago... I didn't see your reply right away. Your tarball works perfectly :) I'm re-emerging coreutils right now!

Thank you *so* very much for making that available!
Back to top
View user's profile Send private message
GaryMercer
Tux's lil' helper
Tux's lil' helper


Joined: 24 Mar 2003
Posts: 88
Location: (UK)

PostPosted: Sat Mar 22, 2008 10:08 pm    Post subject: Reply with quote

Voltago wrote:
This is a coreutils package for plain i686:

Just unpacking it and exporting the ./bin folder to your PATH should enable you to emerge coreutils. There should be several threads around for resolving cyclic blocker bugs, also have a look at the Gentoo Handbook.



Thank you, Thank you, Thank you. I decided in my tired state to Emerge -C coreutils, then I realised what happened. This tarball worked a treat


Cheers
Gary
_________________
No one means all he says, and yet very few say all they mean, for words are slippery and thought is viscous.
Back to top
View user's profile Send private message
sgarcia
Apprentice
Apprentice


Joined: 21 May 2003
Posts: 249
Location: Bakersfield, CA

PostPosted: Tue Apr 15, 2008 5:18 pm    Post subject: Reply with quote

I'm glad I found this thread. I had tried to look back at the log of files uninstalled when I had foolishly allowed coreutils to be unmerged. I created a file from that and tarred up all those files on another system. Guess that's not a very complete method. I had a working system (ls and cp and all were back) but it was *not* enough to get emerge to work.

This tarball saved my bacon.

Thanks!
_________________
Ignorance killed the cat. Curiosity was framed.
Back to top
View user's profile Send private message
TheBunman
n00b
n00b


Joined: 05 May 2004
Posts: 28

PostPosted: Thu Apr 17, 2008 7:58 am    Post subject: Reply with quote

stupid me did the same thing.
Thanks a lot for the tarball, my system is working again :)
_________________
how would you feel if you no longer feared your government
Back to top
View user's profile Send private message
mathusael
n00b
n00b


Joined: 22 Jun 2006
Posts: 22

PostPosted: Thu Apr 17, 2008 9:09 am    Post subject: Reply with quote

Saved my day as well :-)

Just as a reminder, exporting path is:
Code:
export PATH="${PATH}:/home/my_user/tmp/usr/bin"
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 338
Location: Wales, UK

PostPosted: Thu Apr 17, 2008 7:33 pm    Post subject: At least yours boots! Reply with quote

I unmerged coreutils as well, and the computer stops during boot up. I am now using a liveCD (Ubuntu! - had it lying around), and I will unpack the files to the correct place in the hope I can get it going again. I must admit, as soon as I saw the last entry in the log file, I realised what I had done:

Code:

1208210150: Started emerge on: Apr 14, 2008 22:55:50
1208210150:  *** emerge --ask --verbose unmerge coreutils
1208210162: === Unmerging... (sys-apps/coreutils-6.9-r1)
1208210165:  *** terminating.


Thanks for the tip and archive!
Paul
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 338
Location: Wales, UK

PostPosted: Thu Apr 17, 2008 8:15 pm    Post subject: Re: At least yours boots! [Solved] Reply with quote

Yep - that worked. I had to create a symbolic link from /bin/env to /usr/bin/env, in order to use portage scripts without error messages.

As an improvement suggestion, maybe Portage should have a list of files which will really give you a problem if unmerged, and ask for your confirmation before allowing you to do something stupid. Also, the blocking error message could have been solved by only unmerging mktemp - maybe there could be an information message to that effect when trying to emerge coreutils-6.10?

Thanks again for the tip and tarfile :D

Rgds.,
Paul
Back to top
View user's profile Send private message
neilwightman
n00b
n00b


Joined: 12 Jun 2003
Posts: 32
Location: Germany

PostPosted: Fri Apr 18, 2008 8:39 am    Post subject: Reply with quote

I removed it too. :D

I used it as an excuse to re-partition my disks and add some more new disks.
_________________
xfce4, conky, aterm, pidgin, firefox, thunderbird, emacs
Back to top
View user's profile Send private message
phd
n00b
n00b


Joined: 12 Oct 2005
Posts: 52
Location: Warszawa (Poland)

PostPosted: Fri Apr 18, 2008 12:55 pm    Post subject: Reply with quote

I have the same problem after unmerging coreutils. I do not understand how to export PATH to have the tool command available needed to remerge coreutils. I have unpacked old coreutils but I need also some comands like "rm" to have possibilty to reemerge coreutils. After: chrooting && env-update && source /etc/profile; the commands are not available.
Back to top
View user's profile Send private message
oldefortran
l33t
l33t


Joined: 28 Feb 2004
Posts: 652

PostPosted: Fri Apr 18, 2008 6:18 pm    Post subject: Reply with quote

It would be very good with a version of the coreutils files that only requires wget, no tar or bzip. :D
Back to top
View user's profile Send private message
phd
n00b
n00b


Joined: 12 Oct 2005
Posts: 52
Location: Warszawa (Poland)

PostPosted: Mon Apr 21, 2008 9:55 am    Post subject: Reply with quote

Old version I still had on my comp is coreutils-6.9-r1.bz2. I am trying to chroot from ubuntu live-cd to reemerge old version first.
I am trying to do this by commands:
mkdir /mnt/gentoo
mount /dev/hda3 /mnt/gentoo
swapon /dev/hda2
mount /dev/hda1 /mnt/gentoo/boot
mount -t proc proc /mnt/gentoo/proc
chroot /mnt/gentoo /bin/bash
etc-update && source /etc/profile
emerge =sys-app/coreutils-6.9-r1

and answer I obtained is (among others):

/usr/lib/portage/bin/ebuilds.sh line 693: rm: command not found
...

The command "emerge =sys-app/coreutils-6.9-r1 > trace" gives back the following trace file:

Calculating dependencies ... done!
>>> Verifying ebuild Manifests...

>>> Emerging (1 of 1) sys-apps/coreutils-6.9-r1 to /
* coreutils-6.9.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ]
* coreutils-6.9-patches-1.3.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ]
* checking ebuild checksums ;-) ... [ ok ]
* checking auxfile checksums ;-) ... [ ok ]
* checking miscfile checksums ;-) ... [ ok ]
* checking coreutils-6.9.tar.bz2 ;-) ... [ ok ]
* checking coreutils-6.9-patches-1.3.tar.bz2 ;-) ... [ ok ]
/usr/lib/portage/bin/ebuild.sh: line 1515: id: command not found
/usr/portage/sys-apps/coreutils/coreutils-6.9-r1.ebuild: line 34: /bin/expr: No such file or directory
/usr/portage/sys-apps/coreutils/coreutils-6.9-r1.ebuild: line 36: ln: command not found
/usr/lib/portage/bin/ebuild.sh: /usr/lib/portage/bin/filter-bash-environment.py: /usr/bin/env: bad interpreter: No such file or directory

* Messages for package sys-apps/coreutils-6.9-r1:

* The ebuild phase 'setup' has exited unexpectedly. This type of behavior
* is known to be triggered by things such as failed variable assignments
* (bug #190128) or bad substitution errors (bug #200313).
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 338
Location: Wales, UK

PostPosted: Mon Apr 21, 2008 9:17 pm    Post subject: Simple steps Reply with quote

I didn't try to emerge the new version directly. First of all, I mounted the drive from an Ubuntu live CD. I then uncompressed the files in the bin sub-directory of the tarfile mentioned above into the /usr/bin directory on the Gentoo installation. This allowed me to boot, but I had a problem with the lack of /usr/bin/env. Without this file, many of the portage scripts don't seem to run (shebang reference is missing?). Normally this is a symbolic link to /bin/env, so a quick
Code:

ln -s /bin/env /usr/bin/env

solved that problem.

I could then reboot the computer into Gentoo, uninstall mktemp (not needed with the latest coreutils) and emerge coreutils-6.10. I am not saying you can't resolve the problem via chroot from a livecd, just that I preferred the simpler approach! Your effort is failing because the utilities installed by coreutils (such as rm) are missing, but are also needed to install coreutils. Classic bootstrap problem...

Good luck...
Paul
Back to top
View user's profile Send private message
kahotep
n00b
n00b


Joined: 23 Apr 2008
Posts: 1

PostPosted: Wed Apr 23, 2008 8:00 am    Post subject: Reply with quote

Voltago wrote:
This is a coreutils package for plain i686:
http://demandiseineseite.gmxhome.de/bin/coreutils-6.9-r1.tbz2
Just unpacking it and exporting the ./bin folder to your PATH should enable you to emerge coreutils. There should be several threads around for resolving cyclic blocker bugs, also have a look at the Gentoo Handbook.

EDIT: If you have ABI problems ("*.so.x.y not found" or suchlike) let me know and I'll compile a static version.

EDIT2: Just discovered that coreutils-6.10 and greater don't need mktemp any more, so just unmerge that.


I copied all of the files over, but still get an error when emerging coreutils:

>>> Emerging (1 of 3) sys-devel/automake-1.10.1 to /
* automake-1.10.1.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ]
* checking ebuild checksums ;-) ... [ ok ]
* checking auxfile checksums ;-) ... [ ok ]
* checking miscfile checksums ;-) ... [ ok ]
* checking automake-1.10.1.tar.bz2 ;-) ... [ ok ]
/usr/lib/portage/bin/ebuild.sh: /usr/lib/portage/bin/filter-bash-environment.py: /usr/bin/env: bad interpreter: No such file or directory
Traceback (most recent call last):
File "/usr/bin/emerge", line 6971, in ?
retval = emerge_main()
File "/usr/bin/emerge", line 6965, in emerge_main
myopts, myaction, myfiles, spinner)
File "/usr/bin/emerge", line 6395, in action_build
retval = mergetask.merge(pkglist, favorites, mtimedb)
File "/usr/bin/emerge", line 3981, in merge
return self._merge(mylist, favorites, mtimedb)
File "/usr/bin/emerge", line 4259, in _merge
prev_mtimes=ldpath_mtimes)
File "/usr/lib/portage/pym/portage.py", line 4806, in doebuild
alwaysdep=1, logfile=logfile)
File "/usr/lib/portage/pym/portage.py", line 3705, in spawnebuild
retval=spawnebuild(actionmap[mydo]["dep"],actionmap,mysettings,debug,alwaysdep=alwaysdep,logfile=logfile)
File "/usr/lib/portage/pym/portage.py", line 3705, in spawnebuild
retval=spawnebuild(actionmap[mydo]["dep"],actionmap,mysettings,debug,alwaysdep=alwaysdep,logfile=logfile)
File "/usr/lib/portage/pym/portage.py", line 3705, in spawnebuild
retval=spawnebuild(actionmap[mydo]["dep"],actionmap,mysettings,debug,alwaysdep=alwaysdep,logfile=logfile)
File "/usr/lib/portage/pym/portage.py", line 3705, in spawnebuild
retval=spawnebuild(actionmap[mydo]["dep"],actionmap,mysettings,debug,alwaysdep=alwaysdep,logfile=logfile)
File "/usr/lib/portage/pym/portage.py", line 3726, in spawnebuild
_eerror(mysettings, wrap(msg, 72))
File "/usr/lib/portage/pym/portage.py", line 629, in _eerror
env=settings.environ())
File "/usr/lib/portage/pym/portage_exec.py", line 179, in spawn
raise CommandNotFound(mycommand[0])
portage_exception.CommandNotFound: bash
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 338
Location: Wales, UK

PostPosted: Wed Apr 23, 2008 10:40 pm    Post subject: Reply with quote

kahotep wrote:
Voltago wrote:
This is a coreutils package for plain i686:
http://demandiseineseite.gmxhome.de/bin/coreutils-6.9-r1.tbz2
Just unpacking it and exporting the ./bin folder to your PATH should enable you to emerge coreutils. There should be several threads around for resolving cyclic blocker bugs, also have a look at the Gentoo Handbook.

EDIT: If you have ABI problems ("*.so.x.y not found" or suchlike) let me know and I'll compile a static version.

EDIT2: Just discovered that coreutils-6.10 and greater don't need mktemp any more, so just unmerge that.


...
* checking miscfile checksums ;-) ... [ ok ]
* checking automake-1.10.1.tar.bz2 ;-) ... [ ok ]
/usr/lib/portage/bin/ebuild.sh: /usr/lib/portage/bin/filter-bash-environment.py: /usr/bin/env: bad interpreter: No such file or directory



Try
Code:

ln -s /bin/env /usr/bin/env

from a shell. This is exactly the problem I had at the same point. There are other symbolic links in /usr/bin from coreutils, but this appears to be the only one which is needed to emerge the new coreutils.

Good luck.
Back to top
View user's profile Send private message
TreeLearner
n00b
n00b


Joined: 13 Oct 2007
Posts: 4

PostPosted: Fri Apr 25, 2008 7:05 am    Post subject: Getting an error message when emerging automake Reply with quote

I extracted the coreutils package provided by Voltago ( Thank you :D )
Then exported the PATH variable and emergeed coreutils, but got a "rm command not found" message.
So I began making symbolic links of the missing commands in the /bin directory and /usr/bin directory
to the binaries available in the extracted directory. As a result the "command not found" messages are gone
but now there's a new error that I can't put my hands on.

Here's the output of "emerge coreutils"
Code:
>>> Emerging (1 of 3) sys-devel/automake-1.10.1 to /
 * automake-1.10.1.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                [ ok ]
 * checking ebuild checksums ;-) ...                                      [ ok ]
 * checking auxfile checksums ;-) ...                                     [ ok ]
 * checking miscfile checksums ;-) ...                                    [ ok ]
 * checking automake-1.10.1.tar.bz2 ;-) ...                               [ ok ]
 * The ebuild phase 'setup' has exited unexpectedly. This type of behavior
 * is known to be triggered by things such as failed variable assignments
 * (bug #190128) or bad substitution errors (bug #200313).

 * Messages for package sys-devel/automake-1.10.1:

 * The ebuild phase 'setup' has exited unexpectedly. This type of behavior
 * is known to be triggered by things such as failed variable assignments
 * (bug #190128) or bad substitution errors (bug #200313).


Thanks in advanced! ^^
Back to top
View user's profile Send private message
William Abke
n00b
n00b


Joined: 12 Jun 2002
Posts: 19
Location: USA - New Baltimore, Michigan

PostPosted: Fri Apr 25, 2008 9:40 am    Post subject: Reply with quote

Hello,

I too did the same bone head thing and after uncompressing the fiels and exporting the paths, when I would emerge rm/mkdir/env and others were not found.

Out of frustration I just copied the uncompressed file to /bin and /usr/bin (did not overwrite any existing) and that seemed to work.

Thanks,
Bill
Back to top
View user's profile Send private message
TreeLearner
n00b
n00b


Joined: 13 Oct 2007
Posts: 4

PostPosted: Sat Apr 26, 2008 12:22 pm    Post subject: Thank you!! Reply with quote

Bill,

Thank you so much!

William Abke wrote:
I just copied the uncompressed file to /bin and /usr/bin (did not overwrite any existing) and that seemed to work.

That worked like a charm. Watching coreutils emerge was such a relief!
Thanks again to Voltago for letting the coreutils package available.
And thanks to scumm_boy for starting this thread.

And to anybody out there that runs into the coreutils, mktemp block while updating world,
I hope you see this post before running the command "emerge -C mktemp coreutils"
Back to top
View user's profile Send private message
stolar
n00b
n00b


Joined: 15 Sep 2007
Posts: 46
Location: Zgierz, Poland

PostPosted: Sat Apr 26, 2008 3:51 pm    Post subject: Reply with quote

Hi Guys,

Unfortunatelly I have also unmerged coreutils, now having the same problem. I got a bit panic, gentoo was my only system at home computer, now I am writing from my collegue's one asking You for a kind of tutorial how to restore my system, since I am not sure I am doing the things mentioned by You in the correct order and generally how it should be:(
What I do is:
1. Boot from Gentoo Linux 2007 minimal cd, mount my swap, root and proc partition
2. Perform /mnt/hda1(my root partition) /mnt/gentoo, chroot /mnt/gentoo /bin/bash, env-update && source /etc/profile
3. cd /bin
4.wget http://demandiseineseite.gmxhome.de/bin/coreutils-6.9-r1.tbz2
5. tar xvjpf coreutils.... (I do the same 3,4,5 for /usr/bin )
6.I perform: export PATH="${PATH}:/home/piotrek/temp/usr/bin" (but I don't know why this one:( , that is why I also do te same for /bin and /usr/bin)
7. When I try: ln -s /bin/env /usr/bin/env I get a message that there is no such command as 'ln' :( what should I do??

Could You please put this instructions for me in such kind of order since had difficulties with reading all Your suggestions and unfortunately I didn't managed to perform them well. I really want to get back my gentoo for monday morning presentation:(
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 338
Location: Wales, UK

PostPosted: Sat Apr 26, 2008 5:19 pm    Post subject: Don't Panic! Reply with quote

Stolar - too complicated!

  • Use suitable liveCD to boot the system, then mount the partition with your /usr directory.
  • Uncompress the contents of the tarfile with coreutils (see Voltago's post above) into /bin and /usr/bin, without replacing anything that is already there. Normally the /usr/bin softlinks to /bin, but copying the files twice is easier than recreating all the links :D .
  • Reboot the computer. It should now boot normally.
  • unmerge mktemp
  • emerge -avuDN world (or whatever command combination you normally use).

The new coreutils should now install, and overwrite the previous coreutils files in /bin and /usr/bin. No need to chroot or run emerge from within a chroot environment.

Good luck! :wink:
Back to top
View user's profile Send private message
stolar
n00b
n00b


Joined: 15 Sep 2007
Posts: 46
Location: Zgierz, Poland

PostPosted: Sat Apr 26, 2008 5:51 pm    Post subject: Reply with quote

Paulj thank You for reply but unfortunatelly I still have the same error while booting my gentoo.

I booted from minimal CD, mounted my / partition, then enetered /bin and /usr/bin respectively unpacking there the stuff provided by Voltago and after reboot I get the same errors...The last on which the machine changs is: 'Skipping /var/run/utmp initialization (ro root?)'. Could have I done something wrong while doing it the way I had presented in my previous post? I wasn't asked to overwrite anything. I only did: wget http://... and then tar xvjpf coreutils... and everything went fine up to that moment but after reboot I still have the same problem:(


...Now I have at least manually removed mktemp ebuild and I have no packets blocking my coreutils emerge,but when I try to emerge it I get the same error as TreeLearner with the 'setup'. After 'ln -s /bin/env /usr/bin/env' command the system tells me that such symbolic link already exist. How to emerge those coreutils??:(
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
Goto page 1, 2  Next
Page 1 of 2

 
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