N
N
naneri2015-01-12 13:00:34
linux
naneri, 2015-01-12 13:00:34

How to update PHP version on Linux via command line?

There is vps with linux. I connect to it via SSH. Root access is. PHP needs to be updated. How to see the version of Linux xs, if you tell me how, I will be grateful.
At the moment, PHP version is 5.3.29, you need to install at least 5.5
. I tried to use this tip:


a) Run this command: sudo apt-get install python-software-properties
b) Run this command: sudo add-apt-repository ppa:ondrej/php5-oldstable
c) Run sudo apt-get update; sudo apt-get install php5
d) This should allow you to use PHP 5.4.10 (or whatever the most recent "Old Stable PHP" is).

But he swears at the second command, says "sudo: add-apt-repository: command not found
"
I don't even know which way to look ...
PS I found out that Debian is worth it.
When I grieve PHP gives this error:

The following packages have unmet dependencies:
php5 : Depends: libapache2-mod-php5 (>= 5.5.20-1~dotdeb.1~) but 5.3.29-1~dotdeb.0 is to be installed or
libapache2-mod-php5filter (>= 5.5.20-1~dotdeb.1~) but it is not going to be installed or
php5-cgi (>= 5.5.20-1~dotdeb.1~) but 5.3.29-1~dotdeb.0 is to be installed or
php5-fpm (>= 5.5.20-1~dotdeb.1~) but it is not going to be installed
Depends: php5-common (>= 5.5.20-1~dotdeb.1~) but 5.3.29-1~dotdeb.0 is to be installed

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Eugene, 2015-01-12
@Nc_Soft


I think you need to set the version something like this

apt-get update -y
apt-get upgrade -y
apt-get dist-upgrade -y
apt-get install software-properties-common python-software-properties -y
add-apt-repository ppa:ondrej/php5

R
ReD, 2015-01-12
@trinitr0

After:
apt-get install php5

D
Dmitry, 2015-01-12
@zmeyjr

www.dev-metal.com/setup-latest-version-php-5-5-deb...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question