Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

php

ubuntu

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) 
like image 698
Filipe Ferminiano Avatar asked Sep 04 '25 16:09

Filipe Ferminiano


1 Answers

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.

like image 113
tanveer ahmad dar Avatar answered Sep 07 '25 05:09

tanveer ahmad dar