0

Hi I was following this guide

and trying to install php 5.6 on my Debian Wheezy (64 bits).

I'm doing it because I have virtualmin on my server and my php version is 5.4 and I need the 5.6 to do a backup of my wordpress through "Duplicator", however it requires me the 5.6 at least.

I was trying to install php 5.6 manually (btw I couldn't find the package libdb5.3-dev ), but when I tried to extract and move my php5.6 it gave an error.

I tried to use wget a few times and still there was always the same error.

This is the error:

root@ns3009614:/# tar -xvjpf /home/downloads/php-5.6.31.tar.gz -C /opt/build
bzip2: (stdin) is not a bzip2 file.
tar: Child returned status 2
tar: Error is not recoverable: exiting now
root@ns3009614:/# tar -xvjpf /home/downloads -C /opt/build
tar (child): /home/downloads: Cannot read: Is a directory
tar (child): At beginning of tape, quitting now
tar (child): Error is not recoverable: exiting now

bzip2: Compressed file ends unexpectedly;
        perhaps it is corrupted?  *Possible* reason follows.
bzip2: Inappropriate ioctl for device
        Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

tar: Child returned status 2
tar: Error is not recoverable: exiting now

Could you help me out?

Thanks!

0

You are getting a problem because you are trying to treat the php-5.6.31.tar.gz file as a bzip2 compressed file. While the actual file is a gzip compressed file.

Change tar -xvjpf php-5.6.31.tar.gz to tar -xvzf php-5.6.31.tar.gz and this should solve your problem.

0

Edit your /etc/apt/sources.list by adding the following lines:

deb http://packages.dotdeb.org wheezy-php56 all
deb-src http://packages.dotdeb.org wheezy-php56 all

Fetch and install the GnuPG key:

wget https://www.dotdeb.org/dotdeb.gpg
sudo apt-key add dotdeb.gpg

Install PHP 5.6:

sudo apt-get update
sudo apt-get install php5

More options: Instructions on dotdeb.org

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.