无法在 Ubuntu 服务器 18.04 上安装 Phusion Passenger

Unable to install Phusion Passenger on Ubuntu Server 18.04

运行 在 Virtualbox 上全新安装 Ubuntu Server 18.04,Windows 10 作为主机 OS。 运行 Phusion Passenger 网站上的说明 here

这是我遇到的错误:

steve@heartypet-staging:~$ sudo apt-get install -y libnginx-mod-http-passenger
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libnginx-mod-http-passenger : Depends: passenger (= 1:5.3.4-1~bionic1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

奇怪的是,完全相同的指令在桌面版上运行良好。

从这里获取默认源列表

https://askubuntu.com/a/1036749

/etc/apt/source.list替换为上面link中的文件。 然后 sudo apt updatesudo apt upgrade

然后继续...

如果您对以前的解决方案有疑问,一个选择是运行此命令:

sudo nano /etc/apt/sources.list.d/passenger.list

并注释该文件中的所有行,然后 运行 命令

sudo apt-get install passenger