当我安装一个包时root
:
Setting up grub-pc (1.99-21ubuntu3.17) ...
/usr/bin/ucf: line 341: test: !=: unary operator expected
/usr/bin/ucf: line 630: test: =: unary operator expected
ucf: Not loading confmodule, since we are not running as root.
/usr/bin/ucfr: line 241: test: !=: unary operator expected
Installation finished. No error reported.
grub-mkconfig: You must run this as root
dpkg: error processing grub-pc (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
grub-pc
E: Sub-process /usr/bin/dpkg returned an error code (1)
类似的事情发生。简而言之,它确实知道我正在运行root
,这很奇怪。
dpkg 是否使用 fakeroot 之类的东西?任何人都知道如何解决这个问题?
奇怪,
id
命令被空的东西代替了。重新安装coreutils,问题消失了。