Yesterday, I had a killer headache and decided to do some really, really dumb things.

I was trying to install Steam from a deb. I unpacked it and got ready to copy the extracted /usr directory into the real /usr directory. It complained about /usr/lib not existing, so I made the directory and got the files in /usr/lib.

Today, I screwed everything up, and trying to fix it by myself I broke everything even more. I went to log into my computer and i went right to the terminal. KDM wouldn't start. While Gentoo was loading, apache2 complained it couldn't find libstdc++.s0.6. I tried making a symbolic link from /usr/lib to /usr/lib64 and a whole bunch of other stuff. Now, nothing starts. KDM won't start or apache2 or anything, and it just complains that it can't find libstdc++.so.6

Now, I've screwed everything up to the point where emerge isn't even found anymore. I really, really need some help. I installed from Funtoo and figured out a lot of stuff on my own, and I've enjoyed the learning experience of Gentoo and Funtoo, but I have no idea how to fix the huge mess up I've made.

Do I need to reinstall portage or the stage 3 tarball? And what do I have to do to get my libraries back? Where are the default locations for the library folders?
Thank you for the help, it seems I got way too brave with my install.

Last edited by blackkstar on Thu Nov 15, 2012 4:07 am; edited 1 time in total

Welcome to Gentoo.
We will turn a blind eye to you being a Funtoo user for a while.

libstdc++.s0.6 is provided by gcc. If you have a newer but not yet selected gcc, then

Code:

emerge --depclean

will remove your working gcc.
Its scary to start with as you cannot build anything and a few other things don't work either.

The fix is to use gcc-config to choose your new gcc.
To do that, you need to get to a root console in your install.

Do not reinstall the stage3. That will wipe the files that define your install. If you do decide to reinstall, you should save them.

Its a really bad idea to copy random binaries into /usr. Thats what /opt or /usr/local are for. You may find the Steam provides different incompatible versions of some of the same files that Gentoo provides.
Thats a mess - you can keep all the pieces.

There might even be an ebuild for steam.

On Gentoo, if you are installing stuff without using emerge, you are usually doing it wrong._________________Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.

I moved some /usr/lib folders around because I didn't know what to do. I was following a forum post on how to move steam to /usr/ and there was no /usr/lib, only /usr/lib32 and /usr/lib64.

I ran gcc-config -f x86_64-gnu-linux-4.6.3 or something similar and it started to say that libX11.so.6 couldn't be found.

I think I have really screwed something up. I think I accidentally deleted /usr/lib64... =[ I thought maybe I could get emerge to just re-install everything and rebuild the libraries but emerge -avuD world didn't do it.

EDIT: I officially broke everything. I guess I'm not as good at Linux as I thought I was. Going to reinstall.

Well, I reinstalled and honestly I think it helped a lot. I learned some good things from it. I had /home in a separate partition so things weren't that bad and Funtoo is a lot easier the second time.

/usr/lib is a symbolic link to /usr/lib64. /lib is a symbolic link to /lib/64. I probably could have saved my install by playing around with that but I set my use flags a lot better this time and lots of things that were broken (like firefox) are better now.

I learned a few lessons. One is that there's some really, really good advice on the internet, and there's some bad advice. Second, is if you're going to mess with anything, mess with it in /opt and not /usr. Third, is probably that I had no idea what /opt was or why it was there or why AMD used it. When in doubt, google something before you destroy your install and get to recompile everything all over again. Finally, copy over /etc like Neddy said because it's a pain to remember xorg, fstab, and all those other config files.

The moral of the story is don't mess with things in Linux as root when you're not 100% sure on things and you have a god awful migraine. Just because I installed Funtoo doesn't make me some sort of Linux wizard.

Thank you everyone for the help and advice. At the very least you guys gave me some good tips for salvaging installations and it's helped a lot with understanding the directory structure of *nix systems.