Thursday, October 4, 2012

php5 -Ubuntu

How to install php5 in ubuntu


sudo add-apt-repository ppa:ondrej/php5

sudo apt-get update
sudo apt-get install php5

 the processes are as below,


Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv 14AA40EC0831756756D7F66C4F4EA0AAE5267A6C
gpg: requesting key E5267A6C from hkp server keyserver.ubuntu.com
gpg: key E5267A6C: public key "Launchpad PPA for Ondřej Surý" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
icatrz@ubuntu:~$
icatrz@ubuntu:~$ sudo apt-get update
Hit http://ppa.launchpad.net maverick Release.gpg
Hit http://archive.ubuntu.com maverick Release.gpg                
Ign http://ppa.launchpad.net/chromium-daily/stable/ubuntu/ maverick/main Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick/main Translation-en
Ign http://ppa.launchpad.net/chromium-daily/stable/ubuntu/ maverick/main Translation-en_US
Ign http://archive.ubuntu.com/ubuntu/ maverick/main Translation-en_US
Get:1 http://ppa.launchpad.net maverick Release.gpg [316B]         
Ign http://archive.ubuntu.com/ubuntu/ maverick/multiverse Translation-en
Ign http://ppa.launchpad.net/nginx/stable/ubuntu/ maverick/main Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick/multiverse Translation-en_US
Ign http://ppa.launchpad.net/nginx/stable/ubuntu/ maverick/main Translation-en_US
Ign http://archive.ubuntu.com/ubuntu/ maverick/restricted Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick/restricted Translation-en_US
Ign http://archive.ubuntu.com/ubuntu/ maverick/universe Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick/universe Translation-en_US
Hit http://archive.ubuntu.com maverick-updates Release.gpg         
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/main Translation-en   
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/main Translation-en_US
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/multiverse Translation-en
Err http://archive.ubuntu.com/ubuntu/ maverick-updates/multiverse Translation-en_US
  Error reading from server - read (104: Connection reset by peer)
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/restricted Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/restricted Translation-en_US
Get:2 http://ppa.launchpad.net maverick Release.gpg [316B]                   
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/universe Translation-en
Ign http://ppa.launchpad.net/ondrej/php5/ubuntu/ maverick/main Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/universe Translation-en_US
Ign http://ppa.launchpad.net/ondrej/php5/ubuntu/ maverick/main Translation-en_US
Get:3 http://archive.ubuntu.com maverick-proposed Release.gpg [198B]         
Hit http://ppa.launchpad.net maverick Release.gpg                            
Ign http://archive.ubuntu.com/ubuntu/ maverick-proposed/main Translation-en  
Ign http://ppa.launchpad.net/yogarine/eclipse/ubuntu/ maverick/main Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-proposed/main Translation-en_US
Ign http://ppa.launchpad.net/yogarine/eclipse/ubuntu/ maverick/main Translation-en_US
Ign http://archive.ubuntu.com/ubuntu/ maverick-proposed/multiverse Translation-en
Hit http://ppa.launchpad.net maverick Release                                
Ign http://archive.ubuntu.com/ubuntu/ maverick-proposed/multiverse Translation-en_US
Get:4 http://ppa.launchpad.net maverick Release [9,736B]                     
Ign http://ppa.launchpad.net maverick Release                                
Get:5 http://ppa.launchpad.net maverick Release [9,741B]                     
Get:6 http://ppa.launchpad.net maverick Release [9,741B]                     
Hit http://ppa.launchpad.net maverick Release                                
Hit http://ppa.launchpad.net maverick/main Sources                           
Hit http://ppa.launchpad.net maverick/main i386 Packages                     
Ign http://ppa.launchpad.net maverick/main Sources/DiffIndex                 
Ign http://ppa.launchpad.net maverick/main i386 Packages/DiffIndex           
Get:7 http://ppa.launchpad.net maverick/main Sources [14B]                   
Err http://ppa.launchpad.net maverick/main Sources                           
  Undetermined Error
Get:8 http://ppa.launchpad.net maverick/main i386 Packages [14B]             
Err http://ppa.launchpad.net maverick/main i386 Packages                     
  Undetermined Error
Hit http://ppa.launchpad.net maverick/main Sources                           
Hit http://ppa.launchpad.net maverick/main i386 Packages                     
Hit http://ppa.launchpad.net maverick/main Sources                           
Hit http://ppa.launchpad.net maverick/main i386 Packages                     
Ign http://archive.ubuntu.com/ubuntu/ maverick-proposed/restricted Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-proposed/restricted Translation-en_US
Ign http://archive.ubuntu.com/ubuntu/ maverick-proposed/universe Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-proposed/universe Translation-en_US
Hit http://archive.ubuntu.com maverick Release                               
Hit http://archive.ubuntu.com maverick-updates Release                       
Get:9 http://archive.ubuntu.com maverick-proposed Release [40.8kB]
Ign http://archive.ubuntu.com maverick-proposed Release
Hit http://archive.ubuntu.com maverick/main i386 Packages
Hit http://archive.ubuntu.com maverick/universe i386 Packages
Hit http://archive.ubuntu.com maverick/restricted i386 Packages
Hit http://archive.ubuntu.com maverick/multiverse i386 Packages
Hit http://archive.ubuntu.com maverick-updates/universe i386 Packages
Hit http://archive.ubuntu.com maverick-updates/main i386 Packages
Hit http://archive.ubuntu.com maverick-updates/multiverse i386 Packages      
Hit http://archive.ubuntu.com maverick-updates/restricted i386 Packages      
Ign http://archive.ubuntu.com maverick-proposed/universe i386 Packages/DiffIndex
Ign http://archive.ubuntu.com maverick-proposed/main i386 Packages/DiffIndex 
Ign http://archive.ubuntu.com maverick-proposed/multiverse i386 Packages/DiffIndex
Ign http://archive.ubuntu.com maverick-proposed/restricted i386 Packages/DiffIndex
Hit http://archive.ubuntu.com maverick-proposed/universe i386 Packages       
Hit http://archive.ubuntu.com maverick-proposed/main i386 Packages           
Hit http://archive.ubuntu.com maverick-proposed/multiverse i386 Packages     
Hit http://archive.ubuntu.com maverick-proposed/restricted i386 Packages     
Fetched 2,200B in 36s (60B/s)                
W: GPG error: http://ppa.launchpad.net maverick Release: The following signatures were invalid: NODATA 2
W: GPG error: http://archive.ubuntu.com maverick-proposed Release: The following signatures were invalid: NODATA 2
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/maverick-updates/multiverse/i18n/Translation-en_US.bz2  Error reading from server - read (104: Connection reset by peer)

W: Failed to fetch http://ppa.launchpad.net/ondrej/php5/ubuntu/dists/maverick/main/source/Sources.bz2  Undetermined Error

W: Failed to fetch http://ppa.launchpad.net/ondrej/php5/ubuntu/dists/maverick/main/binary-i386/Packages.bz2  Undetermined Error

E: Some index files failed to download, they have been ignored, or old ones used instead.
icatrz@ubuntu:~$ sudo apt-get install php 5
Reading package lists... Done
Building dependency tree     
Reading state information... Done
E: Unable to locate package php
E: Unable to locate package 5
icatrz@ubuntu:~$ sudo apt-get install php5
Reading package lists... Done
Building dependency tree     
Reading state information... Done
The following extra packages will be installed:
  apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common
  libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3
  libaprutil1-ldap php5-cli
Suggested packages:
  apache2-doc apache2-suexec apache2-suexec-custom php-pear
The following NEW packages will be installed:
  apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common
  libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3
  libaprutil1-ldap php5 php5-cli
0 upgraded, 11 newly installed, 0 to remove and 387 not upgraded.
Need to get 5,985kB/9,169kB of archives.
After this operation, 25.8MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://archive.ubuntu.com/ubuntu/ maverick-updates/main libapr1 i386 1.4.2-3ubuntu1.1 [84.2kB]
Get:2 http://archive.ubuntu.com/ubuntu/ maverick-updates/main libaprutil1-dbd-sqlite3 i386 1.3.9+dfsg-3ubuntu0.10.10.1 [27.2kB]
Get:3 http://archive.ubuntu.com/ubuntu/ maverick-updates/main apache2-mpm-prefork i386 2.2.16-1ubuntu3.5 [2,378B]
Get:4 http://archive.ubuntu.com/ubuntu/ maverick-updates/main libapache2-mod-php5 i386 5.3.3-1ubuntu9.10 [2,946kB]
Get:5 http://archive.ubuntu.com/ubuntu/ maverick-updates/main php5 all 5.3.3-1ubuntu9.10 [1,122B]
Get:6 http://archive.ubuntu.com/ubuntu/ maverick-updates/main php5-cli i386 5.3.3-1ubuntu9.10 [2,924kB]
Fetched 5,985kB in 1min 17s (77.5kB/s)                                       
Selecting previously deselected package libapr1.
(Reading database ... 127833 files and directories currently installed.)
Unpacking libapr1 (from .../libapr1_1.4.2-3ubuntu1.1_i386.deb) ...
Selecting previously deselected package libaprutil1.
Unpacking libaprutil1 (from .../libaprutil1_1.3.9+dfsg-3ubuntu0.10.10.1_i386.deb) ...
Selecting previously deselected package libaprutil1-dbd-sqlite3.
Unpacking libaprutil1-dbd-sqlite3 (from .../libaprutil1-dbd-sqlite3_1.3.9+dfsg-3ubuntu0.10.10.1_i386.deb) ...
Selecting previously deselected package libaprutil1-ldap.
Unpacking libaprutil1-ldap (from .../libaprutil1-ldap_1.3.9+dfsg-3ubuntu0.10.10.1_i386.deb) ...
Selecting previously deselected package apache2.2-bin.
Unpacking apache2.2-bin (from .../apache2.2-bin_2.2.16-1ubuntu3.5_i386.deb) ...
Selecting previously deselected package apache2-utils.
Unpacking apache2-utils (from .../apache2-utils_2.2.16-1ubuntu3.5_i386.deb) ...
Selecting previously deselected package apache2.2-common.
Unpacking apache2.2-common (from .../apache2.2-common_2.2.16-1ubuntu3.5_i386.deb) ...
Selecting previously deselected package apache2-mpm-prefork.
Unpacking apache2-mpm-prefork (from .../apache2-mpm-prefork_2.2.16-1ubuntu3.5_i386.deb) ...
Selecting previously deselected package libapache2-mod-php5.
Unpacking libapache2-mod-php5 (from .../libapache2-mod-php5_5.3.3-1ubuntu9.10_i386.deb) ...
Selecting previously deselected package php5.
Unpacking php5 (from .../php5_5.3.3-1ubuntu9.10_all.deb) ...
Selecting previously deselected package php5-cli.
Unpacking php5-cli (from .../php5-cli_5.3.3-1ubuntu9.10_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for ufw ...
Processing triggers for ureadahead ...
Setting up libapr1 (1.4.2-3ubuntu1.1) ...
Setting up libaprutil1 (1.3.9+dfsg-3ubuntu0.10.10.1) ...
Setting up libaprutil1-dbd-sqlite3 (1.3.9+dfsg-3ubuntu0.10.10.1) ...
Setting up libaprutil1-ldap (1.3.9+dfsg-3ubuntu0.10.10.1) ...
Setting up apache2.2-bin (2.2.16-1ubuntu3.5) ...
Setting up apache2-utils (2.2.16-1ubuntu3.5) ...
Setting up apache2.2-common (2.2.16-1ubuntu3.5) ...
Enabling site default.
Enabling module alias.
Enabling module autoindex.
Enabling module dir.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module status.
Enabling module auth_basic.
Enabling module deflate.
Enabling module authz_default.
Enabling module authz_user.
Enabling module authz_groupfile.
Enabling module authn_file.
Enabling module authz_host.
Enabling module reqtimeout.
Setting up apache2-mpm-prefork (2.2.16-1ubuntu3.5) ...
 * Starting web server apache2                                           [ OK ]
Setting up libapache2-mod-php5 (5.3.3-1ubuntu9.10) ...

Creating config file /etc/php5/apache2/php.ini with new version
 * Reloading web server config apache2                                   [ OK ]
Setting up php5 (5.3.3-1ubuntu9.10) ...
Setting up php5-cli (5.3.3-1ubuntu9.10) ...

Creating config file /etc/php5/cli/php.ini with new version
update-alternatives: using /usr/bin/php5 to provide /usr/bin/php (php) in auto mode.
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

1 comment:

  1. Hello Sibin,


    This is indeed great! But I think perhaps you are generally referring php5 -Ubuntu which is getting unsustainable.

    I am looking for a distro ubuntu derived but simple like elementary, no plank but docky and no slingshot but slings cold or could I remove slingshot and plank and install slings cold and docky in elementary?
    Please keep providing such valuable information.


    Best Regards,
    Abhiram

    ReplyDelete