我想使用env
,但 Ubuntu 告诉我它尚未安装。如果我尝试安装它,Ubuntu 会告诉我无事可做。如何解决这个问题?
$ env
The program 'env' is currently not installed. You can install it by typing:
sudo apt install coreutils
$ sudo apt install coreutils
[sudo] password for jan:
Reading package lists... Done
Building dependency tree
Reading state information... Done
coreutils is already the newest version (8.25-2ubuntu3~16.04).
0 upgraded, 0 newly installed, 0 to remove and 25 not upgraded.
$ env
The program 'env' is currently not installed. You can install it by typing:
sudo apt install coreutils
$ ls -l /usr/bin/env
ls: cannot access '/usr/bin/env': No such file or directory
答案1
如果确实丢失了,如输出所示ls
,您可以使用命令重新安装 coreutils sudo apt-get install --reinstall coreutils
。
这将简单地下载软件包并重新安装它,覆盖任何现有文件并创建任何缺失的文件。