当我尝试执行时sudo add-apt-repository ppa:ondrej/php
:
它向我显示这个
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 95, in <module>
sp = SoftwareProperties(options=options)
File "/usr/lib/python3/dist-packages/softwareproperties /SoftwareProperties.py", line 109, in __init__
self.reload_sourceslist()
File "/usr/lib/python3/dist-packages/softwareproperties/ SoftwareProperties.py", line 599, in reload_sourceslist
self.distro.get_sources(self.sourceslist)
File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 93, in get_sources
(self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Kali/kali-rolling
答案1
要在 Kali Linux 上安装 php,请打开终端并输入:
sudo apt install php*
那么你应该可以使用最新版本的 php。
答案2
PHP在你的操作系统上的安装命令,不带*
sudo apt install php
如果您还没有运行任何网络服务器,该命令将安装 apache2 软件包。