I am having trouble installing zendopcache. When I am running
pecl install zendopcache-7.0.3
I am getting the following:
downloading zendopcache-7.0.3.tgz ...
Starting to download zendopcache-7.0.3.tgz (Unknown size)
....done: 3,582 bytes
Could not get contents of package "/tmp/pear/download/zendopcache-7.0.3.tgz". Invalid tgz file.
Download of "pecl/zendopcache" succeeded, but it is not a valid package archive
Error: cannot download "pecl/zendopcache"
Download failed
install failed
I have looked around for similar issues and I found some suggestion about adding -Z to the install command. This seems to only change the name of the requested file from zendopcache-7.0.3.tgz to zendopcache-7.0.3.tar but the output remains the same (yes, it still complains that a .tar is not a valid .tgz).
I am running Debian 7 Wheezy with PHP 5.4.4-14+deb7u14
I have seen similar issues reported but none had working answers.
Can someone help?
Thanks!
seems there was a temporary issue with the pecl & pear servers. nevermind
Related
I'm using MacOS Big Sur 11.4 and XAMPP 7.4.29. I have only basic knowledge on php and html. I want to go through mediawiki installion on my Mac for personal use. I encounter error message like screenshot below which basically I need to install intl extention in my PHP
I followed the instruction given here
Brew install autoconf
Change the path PATH=”/Applications/XAMPP/xamppfiles/bin:${PATH}”
Go inside the folder cd ext/intl/
Build /Applications/XAMPP/bin/phpize
I encounter error message
Cannot find config.m4. Make sure that you run '/Applications/XAMPP/bin/phpize' in the top level source directory of the module
After that I found a stackoverflow pages here addressing the issue of config.m4 and suggesting to
Install xdebug-2.6.1 (which was written 9 years ago and I can not find in internet)
Finding the file ls config* which I try and fail too
After that, I try to find other way to install the missing extention of php. I found this stackoverflow article. I followed the instruction
brew install icu4c
sudo pecl update-channels
sudo pecl install intl . In this step I put the path of ICU /opt/homebrew/opt/icu4c/
I stucked with an error message like below
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/pear/temp/intl/php_intl.h:33:10: fatal error: 'unicode/ubrk.h' file not found
#include <unicode/ubrk.h>
^~~~~~~~~~~~~~~~
1 error generated.
make: *** [php_intl.lo] Error 1
ERROR: `make' failed
So that's all the thing that I have tried so far. My question since from the beginning has not been solved. How can I install the missing PHP extention so that I can proceed with the installation of mediawiki?
Thank you in advance
When running the two commands to install phpdocs:
pear channel-discover pear.phpdoc.org pear install
phpdoc/phpDocumentor
I get this error below saying I am unable to unpack a tgz file below.
C:\wamp\bin\php\php5.5.12\pear>pear channel-discover pear.phpdoc.org
C:\wamp\bin\php\php5.5.12\pear>pear install phpdoc/phpDocumentor
downloading phpDocumentor-2.8.2.tgz ...
Starting to download phpDocumentor-2.8.2.tgz (16,246,834 bytes)
................................................................................
................................................................................
................................................................................
..........................done: 16,246,834 bytes
ERROR: unable to unpack C:\Users\me\AppData\Local\Temp\pear\download\p
hpDocumentor-2.8.2.tgz
Faced the same problem, turns out package for 2.8.2 has issues, because
pear install phpdoc/PhpDocumentor-2.8.1 worked just fine
It looks like the PEAR installer was unable to uncompress the downloaded .tgz for some reason, perhaps the zlib extension wasn't compiled in, for example.
As a work-around, you can specify that PEAR should request the uncompressed package file instead:
pear install --nocompress phpdoc/phpDocumentor
I tried #kguest answer ->
pear install --nocompress phpdoc/phpDocumentor
with no luck. So I tried "upgrading"
pear upgrade C:\Users\xxxxx\AppData\Local\Temp\pear\download\phpDocumentor-2.8.2.tar
Again, with no luck. Then I build my own solution:
1) Extract the files from the PEAR temp directory:
C:\Users\xxxxx\AppData\Local\Temp\pear\download\phpDocumentor-2.8.2.tar
2) Repack the recently extracted files as TAR (I used 7zip).
3) Reattempt the upgrade but from the newly created TAR:
C:\temp\phpDocumentor.tar
And only THEN it worked.
My solution for phpDocumentor 2.8.5 was
Download the tarball archive from
https://github.com/phpDocumentor/phpDocumentor2/releases
Uncompress the archive phpDocumentor-2.8.5.tgz manulay (e.g. with 7zip) You will get the phpDocumentor-2.8.5.tar, uncompress it too and you will get the folder phpDocumentor-2.8.5 and the file package.xml
Edit the archive package.xml and change the text template:init to template_init (line 2036) in fact it is a path (Info source: https://github.com/phpDocumentor/phpDocumentor2/issues/1608)
Compress the folder phpDocumentor-2.8.5 and the file package.xml (e.g. phpdoc285.tar)
Install the archive phpdoc285.tar
pear install --nocompress phpdoc285.tar
After a few hours of trying other people's solutions I've finally got it working phpDocumentor 2.9.0
You can download it from:
https://github.com/phpDocumentor/phpDocumentor2/releases
then use pear install "filepath\phpDocumentor-2.9.0.tgz"
This issue is especially on windows os, to avoid the error :
ERROR: unable to unpack ...
install 7-zip before you launch the phpdoc command
I'm trying to save an old, failing web-server setup consisting of Fedora, PHP, PEAR, and Oracle.
With some difficulty (I'm very new to all four), I've been able to set up something similar on a newer system. I used Fedora 19, PHP 5.5.4 (with Apache 2.4.6), and Oracle 11g.
That just leaves PEAR.
Now, from what I understand, PEAR is some PHP code, like a library, which PHP Web Applications can use to save time from having to code them again - database connection, for example.
But I don't know what to do with it, or even how to get it. Copy paste from my old system? Download using the CLI using yum? Are there packages I need to be aware of, or is it just a one download-one install thing?
For instance, a basic PHP webpage with the following code:
<?php
phpinfo();
?>
works fine on the new server setup, so I'm assured that everything else is working. But when I try to load the PHP files from the other server, it returns an Internal Server Error. I checked the error_log files under /etc/httpd/logs, and most of the errors appear as below:
PHP Fatal error: require_once(): Failed opening required 'MDB2.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/hrweb/includes/functions.php on line 4
EDIT:
According to the PEAR Website, PEAR is included upon the installation of PHP, though not all modules / packages are there. Typing in the command pear in the CLI does confirm it is installed, though it does not help the issue.
I got the MDB2 package via pear install MDB2, though apparently, MDB2_Driver_oci8 is required. Whenever I try to download that, I get the following:
"MDB2_Driver_oci8" version "1.4.1" does not have REST XML available
In addition to this, I also tried to download OLE, which gets me the following:
No releases available for package "pear.php.net/OLE"
This was also previously the error of trying to download MDB2_Driver_oci8.
Thanks.
You have to install the (surprise!) MDB2 package to get MDB2.php:
$ pear install mdb2
and the adapter of your choice:
$ pear install mdb2_driver_mysql-beta
Then make sure the PEAR php directory is in your include path - see the PEAR manual.
"MDB2_Driver_oci8" version "1.4.1" does not have REST XML available
try to install the beta version:
$ pear install mdb2_driver_oci8-beta
No releases available for package "pear.php.net/OLE"
You're trying to install the stable version, but OLE does not have any stable version (yet): http://pear.php.net/package/OLE/download
Append either -alpha or -beta after OLE:
$ pear install OLE-beta
I've a new EC2 instance with PHP 5.5.4 and I am trying to install Predis from Pear.
Every time I try to install Predis from pear I keep having the following error.
Anyone has an idea on why is this happening? I googled lots for a solution and I cant find an answer
root#ip-xxx-xx-xx-xxx:/etc/nginx# pear install nrk/Predis
downloading Predis-0.8.4.tgz ...
Starting to download Predis-0.8.4.tgz (177,785 bytes)
.....................................done: 177,785 bytes
Parsing of package.xml from file "/tmp/pear/temp/pearxTtEHW/package.xml" failed
Download of "nrk/Predis" succeeded, but it is not a valid package archive
Error: cannot download "nrk/Predis"
Download failed
install failed
PHP 5.5 changed the way unpack works (http://php.net/manual/en/migration55.incompatible.php) so some PEAR or PECL packages are no longer compatible. You can install the package manually. I think it was also fixed in the pear repository, but I'm not sure. It has not been released though.
Seems that Pear can't install from tgz archive.
You have to explicitly request uncompressed files when downloading with -Z, --nocompress option.
So, try sudo pear install -Z package
The best solution for this is to upgrade PEAR's Archive package, which the pear installer uses, and after that you won't need to explicitly request uncompressed files when installing or upgrading existing packages.
$ sudo pear upgrade -Z Archive_Tar
I try to install json extension for php. Using pecl I get the following error:
# pecl install json
downloading json-1.2.1.tgz ...
Starting to download json-1.2.1.tgz (-1 bytes)
....done: 3,585 bytes
Could not get contents of package "/tmp/tmpSdh32B/json-1.2.1.tgz". Invalid tgz file.
Download of "pecl/json" succeeded, but it is not a valid package archive
Error: cannot download "pear/json"
I crawl the web for possible solutions, but without success. Thanks in advance for any pointer.
Best, Andrej
The pecl site was down. After the server was up again, it worked.