嗨,我正在使用 Kali linux Rolling 2020.4 上次更新,在我添加了 php 的 PPA 并为上次更新更新所有内容后,从 2 年到现在一切正常
当我运行时
sudo apt install php8.0
我得到错误E: Unable to locate package php8.0
E: Couldn't find any package by glob 'php8.0'
但我不知道有什么问题这是 ppa 和 php8
http://ppa.launchpad.net/ondrej/php/ubuntu/pool/main/p/php8.0/
还有这里http://ppa.launchpad.net/ondrej/php/ubuntu/
以下命令是我使用的sysadmin@debian-10:~$ sudo apt install -y lsb-release apt-transport-https ca-certificates wget
sysadmin@debian-10:~$ sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sysadmin@debian-10:~$ echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
最佳答案
我通常使用以下命令行。您的命令 ( apt-key add
) 存在细微差别。
作为 super 用户,运行:
apt install -y curl wget gnupg2 ca-certificates lsb-release apt-transport-https
wget https://packages.sury.org/php/apt.gpg
apt-key add apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list
然后,更新包列表:apt update
关于php - 在 debian 中无法通过 glob 'php8.0' 找到任何包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66158318/