Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
913 views
in Technique[技术] by (71.8m points)

php - Cannot add PPA: 'ppa:ondrej/php5-5.6'

I'm trying to update my php 5.5.9 to 5.6 in an Ubuntu machine.

But when I run:

sudo add-apt-repository ppa:ondrej/php5-5.6

I'm getting:

Cannot add PPA: 'ppa:ondrej/php5-5.6'.
Please check that the PPA name or format is correct.

How can I fix this?

EDIT

I ran:

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5

But when I run:

php5 -v

I still get php 5.5.9:

PHP 5.5.9-1ubuntu4.20 (cli) (built: Oct  3 2016 13:00:37) 
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

add the right ppa first, do the following

  1. sudo add-apt-repository ppa:ondrej/php
  2. sudo apt-get update
  3. sudo apt-get -y install php5.6 php5.6-mcrypt php5.6-mbstring php5.6-curl php5.6-cli php5.6-mysql php5.6-gd php5.6-intl php5.6-xsl php5.6-zip

i had the same issue in installing the php5.6 then i did the above steps.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...