我正在尝试使用 ubuntu 安装程序脚本安装网页测试代理https://github.com/WPO-Foundation/wptagent-install
在全新的 Azure Ubuntu 18.04 LTS 映像上,它运行正常。
但是,我需要在新的 VPSCity Ubuntu 18.04 LTS 映像(位于新西兰)上安装它。在此上运行安装程序时,它会失败,并显示:
$ sudo apt-get install ttf-mscorefonts-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ttf-mscorefonts-installer is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'ttf-mscorefonts-installer' has no installation candidate
在此之前我已经做过以下事情:
sudo apt-get update
sudo apt-get upgrade -y
猫/etc/apt/sources.list
给出
deb http://archive.ubuntu.com/ubuntu bionic main restricted universe
deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe
deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu bionic partner
我看到一些帖子说我需要启用多元宇宙。如何通过 SSH 命令行会话执行此操作?
两个不同的 Ubuntu 18.04 LTS 服务器有如此大的差异是正常的吗?
我也在 20.04 上尝试过,同样的问题。
答案1
如果你在packages.ubuntu.com你会注意到包裹在多元宇宙 存储库,您的 sources.list 中缺少该项。
您只需将其添加到 sources.list 文件中的行中:
deb http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse
答案2
我找到了一个解决方案。
我从 Azure vm 中获取了有效的 sources.list 并将其添加到现有 sources.list 的末尾,因此我更新后的 sources.list 如下:
deb http://archive.ubuntu.com/ubuntu bionic main restricted universe
deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe
deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu bionic partner
deb http://azure.archive.ubuntu.com/ubuntu/ bionic main restricted
deb http://azure.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb http://azure.archive.ubuntu.com/ubuntu/ bionic universe
deb http://azure.archive.ubuntu.com/ubuntu/ bionic-updates universe
deb http://azure.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://azure.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb http://azure.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://azure.archive.ubuntu.com/ubuntu/ bionic-security main restricted
deb http://azure.archive.ubuntu.com/ubuntu/ bionic-security universe
deb http://azure.archive.ubuntu.com/ubuntu/ bionic-security multiverse