I am writing an ansible script for setting up server in debian 8 , Our existing application is in debian 7 (Wheezy) and the php package is used there is wheezy-php56, The PHP version in the new server is going to be the same. Can I use the same package here ie, wheezy-php56 or is there a jessie-php56 ?
This is the sources.list for Debian 7
deb http://packages.dotdeb.org wheezy all
deb-src http://packages.dotdeb.org wheezy all
deb http://packages.dotdeb.org wheezy-php56 all
deb-src http://packages.dotdeb.org wheezy-php56 all
What should be sources.list for Debian 8
Debain 8 already contains the package PHP 5.6.7
Related
This is the error that is displayed when trying to install.
root#BH13:# apt-get install php5-gd
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php5-gd : Depends: libt1-5 (>= 5.1.0) but it is not installable
Depends: libvpx1 (>= 1.0.0) but it is not installable
E: Unable to correct problems, you have held broken packages.
php version.
root#BH13:# php -v
PHP 5.5.38-1~dotdeb+7.1 (cli) (built: Jul 21 2016 18:33:48)
It does not let me install php5-gd to use the php image libraries.
This is in sources.list
deb http://http.debian.net/debian/ squeeze-lts main contrib non-free
deb http://packages.dotdeb.org wheezy-php55 all
deb-src http://packages.dotdeb.org wheezy-php55 all
deb http://packages.dotdeb.org wheezy all
deb-src http://packages.dotdeb.org wheezy all
deb http://packages.dotdeb.org squeeze all
This was the version of php that I had before updating:
PHP Version 5.4.45-0+deb7u9
and previous sources.list
deb http://ftp.nl.debian.org/debian/ wheezy main
deb-src http://ftp.nl.debian.org/debian/ wheezy main
deb http://security.debian.org/ wheezy/updates main contrib
deb-src http://security.debian.org/ wheezy/updates main contrib
Thanks for the support.
I have been tried install php in debian 9 but not working to me.
I did this command:
sudo apt-get -y install php7.0 libapache2-mod-php7.0
Error after it:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libapache2-mod-php7.0 : Depends: php7.0-cli but it is not going to be installed
Depends: php7.0-opcache but it is not going to be installed
Depends: libc6 (>= 2.27) but 2.24-11+deb9u3 is to be installed
E: Unable to correct problems, you have held broken packages.
(i tried to install this dependencies but i cant, always it depends to another one)
the /etc/apt/sources.list
#
# deb cdrom:[Debian GNU/Linux 9.4.0 _Stretch_ - Official amd64 NETINST 20180310$
# deb cdrom:[Debian GNU/Linux 9.4.0 _Stretch_ - Official amd64 NETINST 20180310$
deb http://ftp.br.debian.org/debian/ stretch main
deb-src http://ftp.br.debian.org/debian/ stretch main
deb http://security.debian.org/debian-security stretch/updates main
deb-src http://security.debian.org/debian-security stretch/updates main
# stretch-updates, previously known as 'volatile'
deb http://ftp.br.debian.org/debian/ stretch-updates main
deb-src http://ftp.br.debian.org/debian/ stretch-updates main
deb http://http.us.debian.org/debian/ wheezy main contrib non-free
Anyone can help me?
Thanks advance
It seems you've merged in your apt file wheezy and stretch releases of debian. Try removing the last line of your file :
deb http://http.us.debian.org/debian/ wheezy main contrib non-free
and then try an apt-get update command. Then you could try to install php7.
But be aware that if you're starting from an wheezy install, you must upgrade it to stretch before trying to install php7.0
I'm trying to install PHP on Debian 8 for a project I'm working on. The project requires PHP 5.4 and can't any of the later versions of PHP (5.5 and 5.6). Whenever I install php5 using apt-get, it installs the latest available version of PHP 5.6. How do I install PHP 5.4.44 (or whatever the latest version of PHP 5.4 actuall is)?
You need to add the old stable (wheezy) repos to the apt sources lists .
Create a file at:
/etc/apt/sources.list.d/wheezy.list
And add following content:
deb http://ftp.us.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.us.debian.org/debian/ wheezy main contrib non-free
run following commands to update the repo infos and install php5.4.44
apt-get update
apt-get install php5=5.4.44-0+deb7u1
You should think about version pinning. You could do that similar to:
Create a file at:
/etc/apt/preferences.d/php5
Package: php5*
Pin: release a=oldstable
Pin-Priority: 700
Package: php-*
Pin: release a=oldstable
Pin-Priority: 700
Edit:
The version of PHP5.4 has been updated to 5.4.45 so you may do a version lookup before installing this specific version and just replace the version number with the newest.
The distribution has had an update since then. As of today, the version has been bumped so try:
apt-get install php5=5.4.45
you can use apt-get install and by adding = beside the php5 you can name what the version exactly you want ,Such that if you want to install the version named 5.4.44, you use this:
apt-get install php5=5.4.44
On dotdeb.org it is said:
On February 18th 2015, the PHP group released PHP 5.4.38.
The corresponding packages are now available on Dotdeb :
for Debian 7 “Wheezy” and Debian 6 “Squeeze”, on both amd64 and i386
architectures.
That is cool, but I have added them to sources list, updated package list with apt-get update, and made apt-get upgrade... but PHP only updated to 5.3.29-1~dotdeb.0
Any idea why and how to fix it? There is totally no contact with them.
My sources.list:
deb http://packages.dotdeb.org squeeze all
deb-src http://packages.dotdeb.org squeeze all
deb http://packages.dotdeb.org squeeze-php54 all
deb-src http://packages.dotdeb.org squeeze-php54 all
Commands and output:
apt-get update
Hit http://packages.dotdeb.org squeeze Release.gpg
Ign http://packages.dotdeb.org squeeze/all Translation-en_US
Hit http://packages.dotdeb.org squeeze-php54 Release.gpg
Ign http://packages.dotdeb.org squeeze-php54/all Translation-en_US
Hit http://packages.dotdeb.org squeeze Release
Hit http://packages.dotdeb.org squeeze-php54 Release
Ign http://packages.dotdeb.org squeeze/all Packages/DiffIndex
Ign http://packages.dotdeb.org squeeze/all Sources/DiffIndex
Ign http://packages.dotdeb.org squeeze-php54/all Packages/DiffIndex
Ign http://packages.dotdeb.org squeeze-php54/all Sources/DiffIndex
Hit http://packages.dotdeb.org squeeze/all Packages
Hit http://packages.dotdeb.org squeeze/all Sources
Hit http://packages.dotdeb.org squeeze-php54/all Packages
Hit http://packages.dotdeb.org squeeze-php54/all Sources
Reading package lists... Done
apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
libapache2-mod-php5 mysql-client php-pear php5 php5-cli php5-common
php5-curl php5-dev php5-gd php5-imagick php5-mcrypt php5-mysql php5-sqlite
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
Try with removing the existing PHP packages before you install the new version from the dotdeb.
If that doesn't work you can instruct the apt to install the php from the specific repository like it this described here:
Install package from specific repo
On Debian (Squeeze), I need to upgrade from PHP 5.3 to PHP 5.5.
I tried those commands :
apt-get update; apt-get install php5;
also adding :
echo "deb http://packages.dotdeb.org squeeze all" >> /etc/apt/sources.list
echo "deb-src http://packages.dotdeb.org squeeze all" >> /etc/apt/sources.list
But nothing change, it's still PHP 5.3. Any ideas ? Thanks
I don't think that Dotdeb has PHP 5.5 for Debian 6 Squeeze. The latest version I can see is 5.4.
They have PHP 5.5 only for Debian 7 Wheezy.
Not many people have squeeze now. Did you try http://forums.debian.net/viewtopic.php?f=30&t=108694? They advice
apt-get install php5 -t squeeze-php54 -s
I would try squeeze-php55, and if it works, then without -s