How to install module crypt_random_string, Crypt_Hash, and Crypt_Base with php pear?
I tried to use pear list-all but there's no module from that module.
And I tried using the following commands
pear install phpseclib/crypt_random_string
pear install phpseclib/Crypt_Hash
pear install phpseclib/Crypt_Base
but it's giving me the following error install failed.
Did you follow:
pear channel-discover phpseclib.sourceforge.net
pear remote-list -c phpseclib
pear install phpseclib/Crypt_Random
pear install phpseclib/Crypt_Hash
pear install phpseclib/Crypt_Base
Also provide us pear version, OS
Related
I am trying to create a Pear package from my project on github that I have on my local repository, but I'm having alot of trouble getting pfm to work, here is the error I keep getting when I try to install:
Luciens-Macbook-Pro:quisbee-rails admin$ pear install PEAR_PackageFileManager_Cli
No releases available for package "pear.php.net/PEAR_PackageFileManager_Cli"
install failed
I am running on PHP 5.5.15 and pear 1.9.5.
If you look at your pear config settings you'll probably see that the preferred state of packages to download is "stable"
$ pear config-show | grep preferred_state
Or, to be more efficient:
$ pear config-get preferred_state
So to download and install a package that is not marked stable, your best option is to include the version number when you attempt to install it:
$ sudo pear install PEAR_PackageFileManager_Cli-0.4.0
This should work ok for you - assuming you already have all dependencies installed. If not, this is easy to do with the following by including the --alldeps option:
$ sudo pear install --alldeps PEAR_PackageFileManager_Cli-0.4.0
Ok, I'm using a MacBook and have MAMP PRO installed for PHP environment.
I'm trying to use Pear to install PHPUnit, but can't get it working. PHPUnit tells me pear: command not found
I came across a tutorial that suggests using sudo php install-pear-nozlib.phar to install pear, but when I run it, I get the following:
[PEAR] Archive_Tar - already installed: 1.3.7
[PEAR] Console_Getopt - already installed: 1.3.0
[PEAR] Structures_Graph- already installed: 1.0.4
[PEAR] XML_Util - already installed: 1.2.1
[PEAR] PEAR - already installed: 1.9.4
Wrote PEAR system config file at: /Applications/MAMP/bin/php/php5.4.10/conf/pear.conf
You may want to add: /Applications/MAMP/bin/php/php5.4.10/lib/php to your php.ini include_path
okay, so it thinks Pear is already installed, but I can't seem to reference it to do anything without the command not found error. I'm thinking that there's some sort of conflict as it's already installed as part of MAMP, but that the MAMP version isn't being referenced through the command line?
I know very little about terminal commands. Is my thinking even on the right track?
The answer is in the error message:
You may want to add: /Applications/MAMP/bin/php/php5.4.10/lib/php
to your php.ini include_path
There is the MAMP install of PHP & the systemwide PHP. You need to use the MAMP specific install of PHP. Try this command.
sudo /Applications/MAMP/bin/php/php5.4.10/lib/php install-pear-nozlib.phar
Also, here are my notes on installing phpunit under Mac OS X 10.6.8. Should work for Mac OS X 10.9. Mind you this is for a system install of phpunit and not MAMP specific.
First get curl to get the go-pear.phar:
http://pear.php.net/go-pear.phar > go-pear.phar
At this point you might need to edit your .bash_profile and add /usr/local/pear/bin to $PATH.
Now run go-pear.phar:
sudo php -q go-pear.phar
Set the pear channels:
sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover components.ez.no
sudo pear channel-discover pear.symfony-project.com
sudo pear channel-discover pear.symfony.com
Might need to explicitly indicate with pear you need when running the commands so this can work as well:
sudo /usr/local/pear/bin/pear channel-discover pear.phpunit.de
sudo /usr/local/pear/bin/pear channel-discover components.ez.no
sudo /usr/local/pear/bin/pear channel-discover pear.symfony-project.com
sudo /usr/local/pear/bin/pear channel-discover pear.symfony.com
Now install phpunit:
sudo pear install --alldeps phpunit/PHPUnit
Now edit php.ini:
sudo nano /etc/php.ini
Find the includes path entry:
;include_path = ".:/php/includes/"
Uncomment—if it is commented—and change it to include the pear path:
include_path = ".:/usr/local/pear/share/pear:/php/includes/"
I try to install Pear Text_Diff by using
pear install Text_Diff
However, the it says
no release avaiable for package "pear.php.net/Text_Diff". install failed.
What is wrong?
PEAR on windows sometimes needs a little refresh running the following commands before install:
pear clear-cache
pear update-channels
And finally again:
pear install Text_Diff
I am trying to install pear's mdb2 package so I can use mail queue. I enter the following command and get the error below. Any suggestions?
C:\wamp\bin\php\php5.3.4>pear install MDB2
No releases available for package "pear.php.net/MDB2" install failed
* I have been able to install manually, but can not answer my own question yet.*
Maybe a temporary issue? Could be a bug in the version of PEAR too.
Try:
pear upgrade PEAR
pear upgrade-all
pear channel-update pear.php.net
pear install MDB2
I faced the same because of temporary files, so I had to clear pear cache then all worked perfectly. Running on WAMP (Windows)
pear clear-cache
pear install -a PackageName
I need a phpunit.bat to configure my NetBeans IDE.
I'm using wamp, and I just install phpunit via pear using these instructions:
Before start using PEAR, Update by downloading last go-pear from http://pear.php.net/go-pear.phar and save it into: C:\wamp\bin\php\php5.3.3\PEAR
Then:
cd C:\wamp\bin\php\php5.3.0>
php -d phar.require_hash=0 PEAR/go-pear.phar
pear channel-discover pear.phpunit.de
pear channel-discover components.ez.no
pear channel-discover pear.symfony-project.com
pear install phpunit/PHPUnit
After do that I can't find any phpunit.bat or phpunit.php
How can I get a phpunit.bat (or any CLI) after install phpunit via PEAR?
Type:
pear config-show
look for the PEAR executables directory
Your phpunit.bat will be there.
If it isn't:
pear install --alldeps --force phpunit/phpunit
and look again.