Recently I encounter following problem while installing PEAR in Ubuntu 14.04 server, after long search I found that, it is a bug already reported a long before. Solution at bottom of the page.
Solution: Edit /usr/share/php/Archive/Tar.php find and replace the following 'gzopen' with gzopen64' and 'gzseek' with gzseek64'
root@dns:~# pear install DB
WARNING: "pear/DB" is deprecated in favor of "pear/MDB2"
WARNING: "pear/Console_Getopt" is deprecated in favor of "pear/Console_GetoptPlus"
downloading DB-1.8.2.tgz ...
Starting to download DB-1.8.2.tgz (131,693 bytes)
.............................done: 131,693 bytes
could not extract the package.xml file from "/build/buildd/php5-5.5.9+dfsg/pear-build-download/DB-1.8.2.tgz"
Download of "pear/DB" succeeded, but it is not a valid package archive
Error: cannot download "pear/DB"
downloading PEAR-1.9.5.tgz ...
Starting to download PEAR-1.9.5.tgz (290,006 bytes)
...done: 290,006 bytes
could not extract the package.xml file from "/build/buildd/php5-5.5.9+dfsg/pear-build-download/PEAR-1.9.5.tgz"
Download of "pear/PEAR" succeeded, but it is not a valid package archive
Error: cannot download "pear/PEAR"
downloading Archive_Tar-1.3.16.tgz ...
Starting to download Archive_Tar-1.3.16.tgz (20,024 bytes)
...done: 20,024 bytes
could not extract the package.xml file from "/build/buildd/php5-5.5.9+dfsg/pear-build-download/Archive_Tar-1.3.16.tgz"
Download of "pear/Archive_Tar" succeeded, but it is not a valid package archive
Error: cannot download "pear/Archive_Tar"
downloading Console_Getopt-1.4.0.tgz ...
Starting to download Console_Getopt-1.4.0.tgz (4,534 bytes)
...done: 4,534 bytes
could not extract the package.xml file from "/build/buildd/php5-5.5.9+dfsg/pear-build-download/Console_Getopt-1.4.0.tgz"
Download of "pear/Console_Getopt" succeeded, but it is not a valid package archive
Error: cannot download "pear/Console_Getopt"
downloading XML_Util-1.2.3.tgz ...
Starting to download XML_Util-1.2.3.tgz (17,134 bytes)
...done: 17,134 bytes
could not extract the package.xml file from "/build/buildd/php5-5.5.9+dfsg/pear-build-download/XML_Util-1.2.3.tgz"
Download of "pear/XML_Util" succeeded, but it is not a valid package archive
Error: cannot download "pear/XML_Util"
Download failed
install failed
Solution: Edit /usr/share/php/Archive/Tar.php find and replace the following 'gzopen' with gzopen64' and 'gzseek' with gzseek64'