我想在Ubuntu中安装php7或7.1,但我不能
我尝试使用此代码:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.1
这就是结果:
sudo: unable to resolve host myvps
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.1
E: Couldn't find any package by regex 'php7.1'
也适用于PHP 7.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.0
E: Couldn't find any package by regex 'php7.0'
但我知道我可以安装php5但我不想要!
这个赞扬的结果php -v
root@myvps:~# php -v
The program 'php' is currently not installed. You can install it by typing:
apt-get install php5-cli
这是我的ubuntu信息:
root@myvps:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 15.04
Release: 15.04
Codename: vivid
怎么了?是否有可能解决这个问题?
答案 0 :(得分:1)
所有代码都是正确的但是我们需要注意内核发布的生命终结它是如此重要!
我的问题来自这里!
并且为了解决我们有2个选项:
答案 1 :(得分:0)
尝试不添加任何存储库。
sudo apt-get install php7.0