MrUnknow
MrUnknow

Reputation: 399

Unable to install php7.0 on ubuntu

I want to install php7 or 7.1 in Ubuntu but i can't

I try with this code :

 sudo add-apt-repository ppa:ondrej/php
 sudo apt-get update
 sudo apt-get install -y php7.1

and this is result :

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'

Also for 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'

But i know i can install php5 but i don't want ! se result of this commend php -v

root@myvps:~# php -v
The program 'php' is currently not installed. You can install it by typing:
apt-get install php5-cli

and here is my ubuntu information :

root@myvps:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 15.04
Release:        15.04
Codename:       vivid

whats wrong ? is it possible to solve this problem ?

Upvotes: 2

Views: 4095

Answers (2)

MrUnknow
MrUnknow

Reputation: 399

All code is correct however we need to attention to Kernel release end of life it is so important !

My problem is from here !

and for solve that we have 2 option :

  • first upgrade Kernel release (recommended)
  • second use from this hack (at your own risk)

Upvotes: 1

Vahe Galstyan
Vahe Galstyan

Reputation: 1729

Try without adding any repositories.

 sudo apt-get install php7.0 

Upvotes: 0

Related Questions