即使将 --prefix 传递给配置,也会拒绝安装权限
我正在尝试安装gcc(gcc的一个分支,而不是svn中的主干),我将其配置为:
./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 是一个存在的目录。
当我运行 make 时,它可以很好地构建 gcc。
但是,当我进行 make install 时,我得到的是:
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
当我将前缀指定为 /home/user/myroot 时,为什么它仍然想要将内容复制到 /usr/lib?
顺便说一句,如果重要的话,我正在使用 Ubuntu 9.10。我已经安装了 build-essential、gawk、flex、bison 和 libmpfr。
I am trying to install gcc (a branch of gcc, not the trunk in the 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 a directory that exists.
When I run make, it builds gcc fine.
However, when I do make install, 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 it still want to copy stuff to /usr/lib when I specified the prefix to be /home/user/myroot?
Btw, I am using Ubuntu 9.10 if that matters. I have already installed build-essential, gawk, flex, bison, and libmpfr.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么将
libexecdir
设置为/usr/lib
?这意味着它必须将东西安装到/usr/lib
中,这是一个无法写入的目录。您可能需要
--libexecdir=/home/user/myroot/usr/lib
Why did you set the
libexecdir
to/usr/lib
? That means it will have to install things into/usr/lib
, a directory to which you cannot write.You probably want
--libexecdir=/home/user/myroot/usr/lib