Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
915 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 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...