GentooThis forum is for the discussion of Gentoo Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
First of all, I do admit I did a stupid thing . Being a debian user, thought removing kernel-headers would have beeen harmless so I unmerged it.
As the result, I cannot emerge it again, not to speak about any other program I'd like to install. Basically, nothing emerges failing with the following:
I'd appreciate any help and promise I'll be a good user next time :]
>>> Install linux-headers-3.10 into /var/tmp/portage/sys-kernel/linux-headers-3.10/image/ category sys-kernel
make -j3 headers_install INSTALL_HDR_PATH=/var/tmp/portage/sys-kernel/linux-headers-3.10/image///usr/include/.. ARCH=x86 CROSS_COMPILE=i686-pc-linux-gnu-
CHK include/generated/uapi/linux/version.h
UPD include/generated/uapi/linux/version.h
WRAP arch/x86/include/generated/asm/clkdev.h
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_64.h
HOSTCC arch/x86/tools/relocs_32.o
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_x32.h
SYSTBL arch/x86/syscalls/../include/generated/asm/syscalls_32.h
HOSTCC arch/x86/tools/relocs_64.o
In file included from arch/x86/tools/relocs.h:10:0,
from arch/x86/tools/relocs_64.c:1:
/usr/include/errno.h:1:31: fatal error: asm-generic/errno.h: No such file or directory
compilation terminated.
In file included from arch/x86/tools/relocs.h:10:0,
from arch/x86/tools/relocs_32.c:1:
/usr/include/errno.h:1:31: fatal error: asm-generic/errno.h: No such file or directory
compilation terminated.
make[1]: *** [arch/x86/tools/relocs_64.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [arch/x86/tools/relocs_32.o] Error 1
make: *** [archscripts] Error 2
make: *** Waiting for unfinished jobs....
[31;01m*[0m ERROR: sys-kernel/linux-headers-3.10::gentoo failed (install phase):
[31;01m*[0m emake failed
[31;01m*[0m
[31;01m*[0m If you need support, post the output of `emerge --info '=sys-kernel/linux-headers-3.10::gentoo'`,
[31;01m*[0m the complete build log and the output of `emerge -pqv '=sys-kernel/linux-headers-3.10::gentoo'`.
[31;01m*[0m The complete build log is located at '/var/tmp/portage/sys-kernel/linux-headers-3.10/temp/build.log'.
[31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/sys-kernel/linux-headers-3.10/temp/environment'.
[31;01m*[0m Working directory: '/var/tmp/portage/sys-kernel/linux-headers-3.10/work/gentoo-headers-base-3.10'
[31;01m*[0m S: '/var/tmp/portage/sys-kernel/linux-headers-3.10/work/gentoo-headers-base-3.10'
Right,I guess you missed the big red warning when unmerging that
In any case, don't worry. It's easy to get back from this one using a prebuilt package.
As I am typing from an x86 box I just packaged it with quickpkg, and uploaded it to my server. All you need to do is to download this into your root fs /.
Then tar xf it. After that, you should re-emerge linux-headers (first thing), to replace my hand-made package with a legitimate Gentoo one.
By the way, you might be interested in adding this to your make.conf, so portage automatically builds packages at least for system packages. Those packages come in handy when you break something vital.
Unmerging python is slightly worse, both practically and philosophically speaking. However, the worst thing is unmerging glibc and/or tar, that will require a livecd to recover.
Right,I guess you missed the big red warning when unmerging that
In any case, don't worry. It's easy to get back from this one using a prebuilt package.
As I am typing from an x86 box I just packaged it with quickpkg, and uploaded it to my server. All you need to do is to download this into your root fs /.
Then tar xf it. After that, you should re-emerge linux-headers (first thing), to replace my hand-made package with a legitimate Gentoo one.
By the way, you might be interested in adding this to your make.conf, so portage automatically builds packages at least for system packages. Those packages come in handy when you break something vital.
Code:
FEATURES="buildsyspkg"
Thanks for that I untared the usr folder to the root . However, I have no idea why but system seems to be really messed up. Look at the examples:
Quote:
emerge -av linux-headers-3.10
Fatal Python error: Failed to open /dev/urandom
Aborted
Gentoo-20121221 / # eselect python list
/usr/share/eselect/libs/core.bash: line 83: /dev/null: No such file or directory
!!! Error: Couldn't source /usr/share/eselect/libs/default.eselect
Call stack:
* do_action (core.bash:84)
* main (eselect:203)
exiting
/usr/share/eselect/libs/core.bash: line 83: /dev/null: No such file or directory
!!! Error: Couldn't source /usr/share/eselect/libs/default.eselect
Call stack:
* do_action (core.bash:84)
* es_do_list_modules (eselect:126)
* es_do_help (eselect:102)
* main (eselect:206)
exiting
Yesterday, I copied over the usr directory from the official stage3 to my system being convinced it will recover the missing headers. It seems, however that I've made it more messy than before.
Is there any way-out of this except for reinstalling the whole system?
Ugh, if you did that, then I am afraid that re-installing is the fastest way out of this problem.
The fact that there's not even a valid /dev/null means that your system is horribly broken. Note that by replacing your whole /usr with the one in the stage you probably downgraded glibc. That alone is enough to turn your system into a dead boulder.
Eh, I should have waited but to tell the truth I was quite sure gentoo user-experts would have just ignored me having realized my stupidity.
I've been switching to gentoo for a while being still a noob for some matters. All the same, I want to learn but hardly, there's a way to achieve unless making mistakes
Eh, I should have waited but to tell the truth I was quite sure gentoo user-experts would have just ignored me having realized my stupidity.
Hey! we've all been there at some point, so, please, ask as much as you need, either here, at the Gentoo fora, the mailing lists, irc or wherever you feel more comfortable. Even "experts" commit mistakes from time to time
Quote:
I've been switching to gentoo for a while being still a noob for some matters. All the same, I want to learn but hardly, there's a way to achieve unless making mistakes
That's the spirit. But next time, if you are in doubt just ask. Sometimes there's an easy way back, that is, until you give the definitive step that will make things horribly worse
I really wonder what broke your system, linux-headers is a system package alright and you get a big fat warning when removing it. In actuality it is used to build glibc only and should not cause havoc, at least not instantly.
Anyhow, methinks for stable Gentoo binary packages can be downloaded from attic if need arises?
I really wonder what broke your system, linux-headers is a system package alright and you get a big fat warning when removing it. In actuality it is used to build glibc only and should not cause havoc, at least not instantly.
And, infact - it works! I just rebooted, remounted all the partitions, mounted proc and dev and it was it.
I am still having the problem with linux-headers-3.10 but this time, the error is different and the compilation process seems to have gone few steps further. Am I right?
>>> Install linux-headers-3.10 into /var/tmp/portage/sys-kernel/linux-headers-3.10/image/ category sys-kernel
make -j3 headers_install INSTALL_HDR_PATH=/var/tmp/portage/sys-kernel/linux-headers-3.10/image///usr/include/.. ARCH=x86 CROSS_COMPILE=i686-pc-linux-gnu-
CHK include/generated/uapi/linux/version.h
UPD include/generated/uapi/linux/version.h
WRAP arch/x86/include/generated/asm/clkdev.h
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_64.h
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_x32.h
HOSTCC arch/x86/tools/relocs_32.o
SYSTBL arch/x86/syscalls/../include/generated/asm/syscalls_32.h
HOSTCC arch/x86/tools/relocs_64.o
In file included from arch/x86/tools/relocs_32.c:17:0:
arch/x86/tools/relocs.c: In function 'read_ehdr':In file included from arch/x86/tools/relocs_64.c:17:0:
arch/x86/tools/relocs.c: In function 'read_ehdr':
arch/x86/tools/relocs.c:334:13: error: 'errno' undeclared (first use in this function)
arch/x86/tools/relocs.c:334:13: note: each undeclared identifier is reported only once for each function it appears in
arch/x86/tools/relocs.c:334:13: error: 'errno' undeclared (first use in this function)
arch/x86/tools/relocs.c:334:13: note: each undeclared identifier is reported only once for each function it appears in
arch/x86/tools/relocs.c: In function 'read_shdrs':
arch/x86/tools/relocs.c:398:27: error: 'errno' undeclared (first use in this function)
arch/x86/tools/relocs.c: In function 'read_strtabs':
arch/x86/tools/relocs.c:436:35: error: 'errno' undeclared (first use in this function)
arch/x86/tools/relocs.c: In function 'read_shdrs':
arch/x86/tools/relocs.c:398:27: error: 'errno' undeclared (first use in this function)
arch/x86/tools/relocs.c: In function 'read_strtabs':arch/x86/tools/relocs.c: In function 'read_symtabs':
arch/x86/tools/relocs.c:436:35: error: 'errno' undeclared (first use in this function)
arch/x86/tools/relocs.c: In function 'read_symtabs':
arch/x86/tools/relocs.c:461:35: error: 'errno' undeclared (first use in this function)
arch/x86/tools/relocs.c: In function 'read_relocs':
arch/x86/tools/relocs.c:494:35: error: 'errno' undeclared (first use in this function)
arch/x86/tools/relocs.c:461:35: error: 'errno' undeclared (first use in this function)
arch/x86/tools/relocs.c: In function 'read_relocs':
arch/x86/tools/relocs.c:494:35: error: 'errno' undeclared (first use in this function)
make[1]: *** [arch/x86/tools/relocs_32.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [arch/x86/tools/relocs_64.o] Error 1
make: *** [archscripts] Error 2
make: *** Waiting for unfinished jobs....
[31;01m*[0m ERROR: sys-kernel/linux-headers-3.10::gentoo failed (install phase):
[31;01m*[0m emake failed
[31;01m*[0m
[31;01m*[0m If you need support, post the output of `emerge --info '=sys-kernel/linux-headers-3.10::gentoo'`,
[31;01m*[0m the complete build log and the output of `emerge -pqv '=sys-kernel/linux-headers-3.10::gentoo'`.
[31;01m*[0m The complete build log is located at '/var/tmp/portage/sys-kernel/linux-headers-3.10/temp/build.log'.
[31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/sys-kernel/linux-headers-3.10/temp/environment'.
[31;01m*[0m Working directory: '/var/tmp/portage/sys-kernel/linux-headers-3.10/work/gentoo-headers-base-3.10'
[31;01m*[0m S: '/var/tmp/portage/sys-kernel/linux-headers-3.10/work/gentoo-headers-base-3.10'
.
The first errors (the ones about your locales) are probably easily fixable by re-editing /etc/locale.gen (if needed, just to make sure it's ok), and then running "locale-gen" as root.
You must make sure that you generate the locales that portage is complaining about (en_US.UTF-8).
But the rest of errors about undefined symbols and that stuff is probably due to your toolchain being completely broken, which, as I said, is to be expected when your system binaries have been built against a toolchain that you abruptly overwrote with another one.
If you truly want to recover from this, as a learning exercise, you can look into the [url=http://tinderbox.dev.gentoo.org/]gentoo tinderbox[/u], which has prebuilt binaries for the most critical packages. You might be able to do something using those, you'll need to restore portage, glibc, gcc, binutils, coreutils, sandbox, libtool, python and probably some others.
You can put the packages in /usr/portage/packages and use emerge -K to force installation via binary packages. Or, if that doesn't work, just use tar as before (your system can't possibly go any worse, so...).
If you get to the point where you can use "eselect" to pick the new binary toolchain, and then "emerge -e system" then that's a good start.
You can put the packages in /usr/portage/packages and use emerge -K to force installation via binary packages. Or, if that doesn't work, just use tar as before (your system can't possibly go any worse, so...).
If you get to the point where you can use "eselect" to pick the new binary toolchain, and then "emerge -e system" then that's a good start.
OK. I will give it a try in next days when I get more free time. As you said - it can't go any worse .
Stay tuned for more
If you truly want to recover from this, as a learning exercise, you can look into the [url=http://tinderbox.dev.gentoo.org/]gentoo tinderbox[/u], which has prebuilt binaries for the most critical packages. You might be able to do something using those, you'll need to restore portage, glibc, gcc, binutils, coreutils, sandbox, libtool, python and probably some others.
You can put the packages in /usr/portage/packages and use emerge -K to force installation via binary packages. Or, if that doesn't work, just use tar as before (your system can't possibly go any worse, so...).
I downloaded portage binary file from tinderbox, created /usr/portage/rescue dir to have all the system binaries stored.
When I emerge
* IMPORTANT: 5 news items need reading for repository 'gentoo'.
* Use eselect news to read news items.
Calculating dependencies... done!
emerge: there are no ebuilds to satisfy "=portage-2.2.7".
I've also tried untaring. 2 dirs /usr and /etc extract from the archive. Should I copy them over?
I'm afraid, I'm stopping understanding what I am doing.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.