How can I install PHP 5.4 in Debian 7.5 (Wheezy)?

1

I wonder if you have any way to install PHP 5.4 on Debian 7.5 via apt-get, adding some URL in sources.list.

I added the following lines however it asks a lot of dependencies:

deb http://packages.dotdeb.org/ squeeze-php54 all
deb-src squeeze-php54 all http://packages.dotdeb.org

Joao Fernando Mortani

Posted 2015-10-13T14:35:55.443

Reputation: 13

“I added the following lines however it asks a lot of dependencies.” Then that is what has to happen… Lots of dependencies need to be installed. Is that a problem? Because that is simply how it is done. More details on Dotdeb here. – JakeGould – 2015-10-13T14:40:32.467

Why on Earth are you trying to install PHP in Debian using some unknown third-party site? Sorry but did you even bother first searching for "php" on the Debian package archive site? Or, basically, doing apt-cache search php -- as suggested in any Debian handbook?

– kostix – 2015-10-13T16:11:47.567

1Note that your strange site uses "squeeze-php54" as the release name, suggesting that those packages are really built for Squeeze -- a Debian release preceding Wheezy, the current stable one. Hence it looks like you've just blindly followed some outdated blog post/HOWTO. That's a really bad practice! You should try to make sence of any command or configuration file snippet a guide wants you to run/apply. Otherwise you can easily wreak havoc on your system. – kostix – 2015-10-13T16:15:00.140

I am using this way because that's how I met for the installation of PHP 5.4. I am also using this machine the paravirtualizar vagrant and the puppet to set up.

As the dependencies thought the apt-get solve the dependencies alone. If not mistaken YUM solve such dependence. I am new to the debian world. – Joao Fernando Mortani – 2015-10-13T17:18:12.203

Answers

2

PHP 5.4 is the default version in Debian wheezy.

https://packages.debian.org/wheezy/php5

You should be able to install it using

apt-get install php5

if you have the normal wheezy repositories in your sources.list

Those lines you added in your sources.list seems to be for Debian squeeze, which was the release before wheezy.

So if you do have problems, you should really check that your sources.list contains the wheezy repositories.

Thomas Weinbrenner

Posted 2015-10-13T14:35:55.443

Reputation: 735