当我安装如下软件包时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 之类的东西?有人知道如何修复它吗?
答案1
奇怪的是,id
命令被替换为一些空的内容。
重新安装 coreutils 后问题消失。