could not extract the package.xml file from "/build/buildd/php5-5.5.9+dfsg/pear-build-download/packagename.tgz"

Bug #1310552 reported by Omar Chris Eugene on 2014-04-21
This bug affects 8 people
Affects Status Importance Assigned to Milestone
php5 (Ubuntu)

Bug Description

Description: Ubuntu 14.04 LTS
Release: 14.04

  Installed: 5.5.9+dfsg-1ubuntu4
  Candidate: 5.5.9+dfsg-1ubuntu4

Expexted result:

pear install phing/phing

Actual result:
see and

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: php-pear 5.5.9+dfsg-1ubuntu4 [modified: usr/share/php/Archive/Tar.php]
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic i686
ApportVersion: 2.14.1-0ubuntu3
Architecture: i386
CurrentDesktop: Unity
Date: Mon Apr 21 13:23:12 2014
InstallationDate: Installed on 2014-04-17 (3 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release i386 (20140417)
PackageArchitecture: all
SourcePackage: php5
UpgradeStatus: No upgrade log present (probably fresh install)

Omar Chris Eugene (xriseugene) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in php5 (Ubuntu):
status: New → Confirmed
kolAflash (colaflash) wrote :

Confirming bug on "armv7l" port.

Any workarounds?

Omar Chris Eugene (xriseugene) wrote :

none that I know of

kolAflash (colaflash) wrote :


This doesn't helps (actually the mentioned patch seems to be already applied to the Ubuntu files):

This workaround seems to work for me (still playing around with it). It probably also works for "pear install".
# First run pear to download the packages. It will probably put the packages into
# /build/buildd/php5-5.5.9+dfsg/pear-build-download/
# but it can't install them.
$ pear upgrade

# Un-Gzip the downloaded packages.
$ gunzip /build/buildd/php5-5.5.9+dfsg/pear-build-download/*.tar

# Now pear should be able to work with the pure tar-files.
$ pear upgrade /build/buildd/php5-5.5.9+dfsg/pear-build-download/*.tar

So by this workaround I guess, the bug's reason is something about the gzip compression.


  Can any one please help me. When this bug is going to solve ?

kolAflash (colaflash) wrote :

Did you try the workaround I suggested? Did it work?

Riccardo Mollo (riccardo-mollo) wrote :

Thanks kolAflash, your workaround works great. :D

Hugo Vieira (hmmvieira) wrote :

I stumbled on this problem today after a fresh install of Xubuntu 14.04 32 bit.
For some reason, kolAflash's workaround is not working for me...

My investigation led me to /usr/share/php/Archive/Tar.php. This script was unable to open tgz files because line 733 was returning "false" when checking for the existence of function gzopen.

With this information, Google showed me a 5 year old bug (still open) that may be related:

I really really had to install some pear packages, so my solution was to replace the following in Tar.php:
- Lines 733 and 744 - Replace gzopen with gzopen64
- Line 888: Replace gzseek with gzseek64 and gztell with gztell64

This is not a solution but it may help find the solution (or maybe fix the 5 year old's bug?).

Jose (joserobleda) wrote :

Thanks Hugo, that works for me

Dashamir Hoxha (dashohoxha) wrote :

The workaround on #5 (by kolAflash) worked for me. I think that it is more safe/stable than the solution on #9, which modifies the code. I do it like this (on a script):

pecl install uploadprogress
gunzip /build/buildd/php5-*/pear-build-download/uploadprogress-*
pear upgrade /build/buildd/php5-*/pear-build-download/uploadprogress-*

pear channel-discover
pear install
gunzip /build/buildd/php5-*/pear-build-download/drush-*
pear upgrade /build/buildd/php5-*/pear-build-download/drush-*

amine zaine (amine250) wrote :

Hugo's workaround worked for me. I just registered to say thank you ! You're a genius :D

Dave Mausner (ak-dave-j0) wrote :

If the build problem is too hard to solve, the gross solution is to modify the PEAR file Tar.php so that each reference to compression type 'gz' also tests for the build's function, like this:

        if ($this->_compress_type == 'gz' && function_exists('gzopen'))
            $this->_file = @gzopen($this->_tarname, "wb9");
        else if ($this->_compress_type == 'gz' && function_exists('gzopen64'))
            $this->_file = @gzopen64($this->_tarname, "wb9");

Chingachkuk (win32-ya) wrote :

Here is the code that helped me getting it working. I injected it to /usr/share/php/Archive/Tar.php.
 * Missing zlib functions.
function gzopen($filename, $mode, $use_include_path = 0) {
  return gzopen64($filename, $mode, $use_include_path);
function gzseek($zp, $offset, $whence = SEEK_SET) {
  return gzseek64($zp, $offset, $whence);
function gztell($zp) {
  return gztell64($zp);

Felix (piela) wrote :

workaround from kolAflash (colaflash) worked for me on a raspberrypi2 with ubuntu 14.04 installed, thanks.

some changes:
files are located in /build/php5-0LI9sl/php5-5.5.9+dfsg/pear-build-download/
original downloads have the ending *.tgz

André (alac1984) wrote :

Hugo Vieira (hmmvieira) #9 worked like a charm!

Thanks man, you really helped! :)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.