Make installation permission denied even if --prefix is ​​passed for configuration

I am trying to install gcc (gcc branch, not trunk in svn) and I configured it with

./configure --prefix=/home/user/myroot/ --enable-languages=c,c++ \ --disable-multilib --libexecdir=/usr/lib --without-included-gettext \ --enable-threads=posix --disable-werror --with-arch-32=i486 \ --with-tune=generic --enable-checking=release --build=i486-linux-gnu \ --host=i486-linux-gnu --target=i486-linux-gnu 

/ home / user / myroot is the directory that exists.

When I run make, it builds gcc fine.

However, when I do the installation, this is what I get:

 make[1]: Entering directory `/home/user/gcc/gcc-cjung' /bin/bash ./mkinstalldirs /home/user/myroot /home/user/myroot make[2]: Entering directory `/home/user/gcc/gcc-cjung/host-i486-linux-gnu/fixincludes' rm -rf /usr/lib/gcc/i486-linux-gnu/4.5.0/install-tools /bin/bash ../.././fixincludes/../mkinstalldirs /usr/lib/gcc/i486-linux-gnu/4.5.0/install-tools mkdir -p -- /usr/lib/gcc/i486-linux-gnu/4.5.0/install-tools mkdir: cannot create directory `/usr/lib/gcc/i486-linux-gnu/4.5.0': Permission denied make[2]: *** [install] Error 1 make[2]: Leaving directory `/home/user/gcc/gcc-cjung/host-i486-linux-gnu/fixincludes' make[1]: *** [install-fixincludes] Error 2 make[1]: Leaving directory `/home/user/gcc/gcc-cjung' make: *** [install] Error 2 

Why does he still want to copy the material to / usr / lib when I specified the prefix as / home / user / myroot?

Btw, I am using Ubuntu 9.10 if that matters. I already installed build-essential, gawk, flex, bison and libmpfr.

+4
source share
1 answer

Why did you install libexecdir in /usr/lib ? This means that he will have to install things in /usr/lib , a directory that you cannot write.

You probably want --libexecdir=/home/user/myroot/usr/lib

+5
source

Source: https://habr.com/ru/post/1315311/


All Articles