我的潜在托管服务提供商建议在终端中运行命令,以使基于 KVM 的服务器的操作系统映像最小化。由于他们的 KVM 模板带有我不需要的包,我想我可能会使用相同的命令来删除不需要的包。
该命令以 开头DEBIAN_FRONTEND=noninteractive,然后apt-get remove按如下方式调用:
DEBIAN_FRONTEND=noninteractive apt-get remove --purge -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" package-1 package-2 ... package-n; apt-get -y autoremove; apt-get clean all
Run Code Online (Sandbox Code Playgroud)
第一次遇到DEBIAN_FRONTEND环境变量,至今没找到有用的信息。所以我想知道将它设置为什么noninteractive,以及它是否可取,因为我认为值 ( noninteractive) 会持续存在。
每当我尝试安装任何东西或运行时apt update,我都会收到此错误:
E: The repository 'http://ppa.launchpad.net/armagetronad-dev/ppa/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Run Code Online (Sandbox Code Playgroud)
我不够熟练,无法弄清楚这一点。我已经看到我可以尝试 ppa purge 但我不知道如何。
当使用apt从“哑”终端(这是为Emacs一个码字),它产生垃圾输出的多行(它可能尝试显示进度,但它不会对这种终端的工作)。
如果我尝试将这些信息保存到一个文件中,也会发生同样的情况,这会破坏没有提供任何有用信息的日志。
因此,有没有办法防止apt产生乱码输出?
我已经看到 SO 问题提出了相反的要求,我认为这种行为是新的。所以,如果版本很重要,那就是:apt 1.4.6 (amd64)
以 E: 开头的错误消息到底是什么意思?我认为这与 Ubuntu-on-Windows 上的文件结构有关,但到底是什么?
The following package was automatically installed and is no longer required:
os-prober
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
libxslt1.1
The following NEW packages will be installed:
libxslt1.1 xmlstarlet
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 435 kB of archives.
After this operation, 1023 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ trusty/main libxslt1.1 amd64 1.1.28-2build1 [145 kB]
Get:2 …Run Code Online (Sandbox Code Playgroud)