我想在 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
怎么了 ?有可能解决这个问题吗?
最佳答案
所有代码都是正确的,但是我们需要注意内核发布的生命周期结束,这非常重要!
我的问题来自这里!
为了解决这个问题,我们有 2 个选项:
关于php - 无法在ubuntu上安装php7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43658845/