我正在使用 Ubuntu 20.04 LTS,并尝试通过从以下网址下载 .deb 文件来安装 Phoronix他们的网站并使用 dpkg。我得到了一些未满足的 php5 包依赖关系;
phoronix-test-suite depends on php-cli | php5-cli; however:
Package php-cli is not installed.
Package php5-cli is not installed.
phoronix-test-suite depends on php5-cli | php-xml; however:
Package php5-cli is not installed.
Package php-xml is not installed.
我尝试安装这些,但我发现
Package php5-cli 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
However the following packages replace it:
php7.0-cli:i386 php7.0-cli
E: Package 'php5-cli' has no installation candidate
显然这是因为 php5 已经过时了,根据这个答案。我读了答案,但我不明白他们说我需要做什么。
有人能向我解释如何解决安装 Phoronix 时出现的依赖问题吗?
答案1
添加 PHP ppa:
sudo add-apt-repository ppa:ondrej/php
然后更新并升级:
sudo apt update
sudo apt upgrade
如果您遇到修复安装问题,请尝试运行
sudo apt install --fix-broken
:(来源)
现在 dpkg.deb
就应该可以解决了!
答案2
你应该sudo apt update
尝试sudo apt-get install <dependency_name>
像这样:
sudo apt update
sudo apt-get install php-cli
sudo apt-get install php5-cli