我'我正在尝试在我没有root权限的计算机上安装util-linux。我运行的命令:
cd util-linux-2.29
./configure --prefix=$( pwd ) --disable-use-tty-group
make
make install
运行make install后我收到以下错误(我截断了输出):
chmod 4755 /athena/elementolab/scratch/chm2059/from_dat02/chm2059/lib/util-linux-2.29/bin/mount
chmod 4755 /athena/elementolab/scratch/chm2059/from_dat02/chm2059/lib/util-linux-2.29/bin/umount
make[4]: Leaving directory `/athena/elementolab/scratch/chm2059/from_dat02/chm2059/lib/util-linux-2.29'
/usr/bin/mkdir -p '/usr/share/bash-completion/completions'
/usr/bin/install -c -m 644 bash-completion/blkid bash-completion/cal bash-completion/col bash-completion/colcrt bash-completion/colrm bash-completion/column bash-completion/findmnt bash-completion/flock bash-completion/getopt bash-completion/hexdump bash-completion/ipcmk bash-completion/ipcrm bash-completion/ipcs bash-completion/isosize bash-completion/logger bash-completion/look bash-completion/lsipc bash-completion/lsns bash-completion/mcookie bash-completion/mkfs bash-completion/mkswap bash-completion/namei bash-completion/prlimit bash-completion/readprofile bash-completion/renice bash-completion/rev bash-completion/script bash-completion/scriptreplay bash-completion/setsid bash-completion/tailf bash-completion/whereis bash-completion/wipefs bash-completion/fsck bash-completion/mkfs.bfs bash-completion/fsck.minix bash-completion/mkfs.minix bash-completion/fsck.cramfs bash-completion/mkfs.cramfs bash-completion/addpart bash-completion/delpart '/usr/share/bash-completion/completions'
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/blkid’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/cal’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/col’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/colcrt’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/colrm’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/column’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/findmnt’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/flock’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/getopt’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/hexdump’: Permission denied
/usr/bin/install: cannot create regular file ‘/usr/share/bash-completion/completions/ipcmk’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/ipcrm’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/ipcs’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/isosize’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/logger’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/look’: Permission denied
/usr/bin/install: cannot create regular file ‘/usr/share/bash-completion/completions/lsipc’: Permission denied
/usr/bin/install: cannot create regular file ‘/usr/share/bash-completion/completions/lsns’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/mcookie’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/mkfs’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/mkswap’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/namei’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/prlimit’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/readprofile’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/renice’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/rev’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/script’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/scriptreplay’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/setsid’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/tailf’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/whereis’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/wipefs’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/fsck’: Permission denied
/usr/bin/install: cannot create regular file ‘/usr/share/bash-completion/completions/mkfs.bfs’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/fsck.minix’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/mkfs.minix’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/fsck.cramfs’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/mkfs.cramfs’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/addpart’: Permission denied
/usr/bin/install: cannot remove ‘/usr/share/bash-completion/completions/delpart’: Permission denied
我'我不知道怎么回事。运行configure后,它确认前缀设置为我设置的前缀。
答案 0 :(得分:1)
在查看make文件时,我发现了以下注释:
#
# Don't rely on configure.ac AC_CONFIG_FILES for install paths.
#
# The paths should be expanded at make time rather than configure:
# - to support 'make install prefix=/foo DESTDIR=/foo'
# - to recursively expands the paths (e.g. AC_CONFIG_FILES expands
# '${exec_prefix}/sbin' to ${exec_prefix}/sbin')
#
所以我跑了:
make install prefix=$( pwd ) DESTDIR=$( pwd )
哪个有效!
答案 1 :(得分:0)
安装需要su
权限。
尝试sudo make install
答案 2 :(得分:0)
没有root权限的make install
总是很棘手。您几乎总是会失去一些功能。
在这种情况下的方法是通过配置文件。
./configure --prefix=$( pwd ) --disable-use-tty-group --disable-bash-completion
应该摆脱这些消息,代价是不再能够完成bash-completion。您也可以查看Makefile
并查看是否必须更改某些内容(例如:应该有一行
bashcompletiondir = /usr/share/bash-completion
或类似的东西。您可以尝试更改该目录。但是,除非这是一次性测试,否则我不建议这样做。