I'm in a bit of an interesting situation.
In an attempt to have root access on my school's physics network computers, I ended up creating a chroot environment, using fakeroot and fakechroot. As every source I've read seems to suggest that debootstrap, a tool to install Debian in a subdirectory, requires root, I went ahead with the method listed here - this entails copying, yes, using
cp, to copy terminal commands and their dependencies into this environment.
I've used this sleek trick so much that I've pretty much copied the entire operating system (Debian+a slew of physics tools) into a subdirectory, a subdirectory that pretends to be an operating system, where I get to pretend I'm sudo/God.
Surprisingly, many things work. They didn't at first, but coffee is good at killing bugs.
Unfortunately, I'm a little bit stuck. Whenever I make use of python (apt-get, et cetera), I get:
Could not find platform independent libraries <prefix> Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Most fixes to this problem involved actually setting the PYTHONHOME and PYTHONPATH variables, which did not fix anything. The other common solution is to just build python from source, which I try, but I receive the following when I try to build anything:
configure: error: C compiler cannot create executables
The attached config.log file for this error can be found here.
Any help would be dearly appreciated. Also, if you have advice to completely avoid this situation or get debootstrap working without root, that would be great as well.
Update1: Tried to simplify things a bit - tried to compile a simple c file and got another commonly listed error:
gcc: error trying to exec 'cc1': execvp: No such file or directory
whereis to locate it - turns out cc1 does not exist in my environment! I will now continue to slave away...
Update2: Created a soft link from gcc to cc1 (
ln -s /usr/bin/gcc /usr/bin/cc1), which put a light bandage on the volcano - I now have unrecognized command line options when I gcc a sample file, including
'-imultiarch x86_64-linux-gnu', and
Update3: Got compiler to work! Fixed all of the above problems by trying different compilers (i.e. gcc-4.4, gcc-4.7, gcc-ar) - the last of which game me a different error - that it could not find a required plugin. This clued me into the fact that not all of the c libraries had been copied over from the base OS. I fixed this which fixed my problem (one of many).
My new problem is an (apparent) lack of GMP, MPFR, and MPC. These are needed to rebuild gcc.
Update4: Compiled all three libraries. The next problem in the gcc build process was not being able to find crt1.o, crti.o, crtn.o, -lgcc, -lgcc_s, and -lc. This was fixed by setting
--enable-multilib as a flag for the configure script.