I was trying to install Pear in Kali Linux 2018.3. I downloaded go-pear.phar and ran the command php go-pear.phar. But I am getting a lot of PHP Startup: Unable to load dynamic library errors and it also seems that an older version of pear is also installed. Here are the warnings I'm getting:

Below is a suggested file layout for your new PEAR installation.  To
change individual locations, type the number in front of the
directory.  Type 'all' to change all of them or simply press Enter to
accept these locations.

 1. Installation base ($prefix)                   : /home/gkv/pear
 2. Temporary directory for processing            : /tmp/pear/install
 3. Temporary directory for downloads             : /tmp/pear/install
 4. Binaries directory                            : /home/gkv/pear/bin
 5. PHP code directory ($php_dir)                 : /home/gkv/pear/share/pear
 6. Documentation directory                       : /home/gkv/pear/docs
 7. Data directory                                : /home/gkv/pear/data
 8. User-modifiable configuration files directory : /home/gkv/pear/cfg
 9. Public Web Files directory                    : /home/gkv/pear/www
10. System manual pages directory                 : /home/gkv/pear/man
11. Tests directory                               : /home/gkv/pear/tests
12. Name of configuration file                    : /home/gkv/.pearrc

1-12, 'all' or Enter to continue: 
Beginning install...
Configuration written to /home/gkv/.pearrc...
Initialized registry...
Preparing to install...
installing phar:///home/gkv/go-pear.phar/PEAR/go-pear-tarballs/Archive_Tar-1.4.3.tar...
installing phar:///home/gkv/go-pear.phar/PEAR/go-pear-tarballs/Console_Getopt-1.4.1.tar...
installing phar:///home/gkv/go-pear.phar/PEAR/go-pear-tarballs/PEAR-1.10.5.tar...
installing phar:///home/gkv/go-pear.phar/PEAR/go-pear-tarballs/Structures_Graph-1.1.1.tar...
installing phar:///home/gkv/go-pear.phar/PEAR/go-pear-tarballs/XML_Util-1.4.2.tar...
install ok: channel://pear.php.net/Archive_Tar-1.4.3
install ok: channel://pear.php.net/Console_Getopt-1.4.1
install ok: channel://pear.php.net/Structures_Graph-1.1.1
install ok: channel://pear.php.net/XML_Util-1.4.2
install ok: channel://pear.php.net/PEAR-1.10.5
PEAR: Optional feature webinstaller available (PEAR's web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)
PEAR: To install optional features use "pear install pear/PEAR#featurename"

WARNING!  The include_path defined in the currently used php.ini does not
contain the PEAR PHP directory you just specified:
If the specified directory is also not in the include_path used by
your scripts, you will have problems getting any PEAR packages working.

Would you like to alter php.ini </etc/php/7.2/cli/php.ini>? [Y/n] : y

WARNING: Cannot write to /etc/php/7.2/cli/php.ini, but php.ini was successfully created
at </home/gkv/pear/php.ini-gopear>. Please replace the file </etc/php/7.2/cli/php.ini> with
</home/gkv/pear/php.ini-gopear> or modify your php.ini by adding:


Current include path           : .:/usr/share/php
Configured directory           : /home/gkv/pear/share/pear
Currently used php.ini (guess) : /etc/php/7.2/cli/php.ini
Press Enter to continue: 

** WARNING! Old version found at /home/gkv/pear/bin, please remove it or be sure to use the new /home/gkv/pear/bin/pear command

The 'pear' command is now at your service at /home/gkv/pear/bin/pear

** The 'pear' command is not currently in your PATH, so you need to
** use '/home/gkv/pear/bin/pear' until you have added
** '/home/gkv/pear/bin' to your PATH environment variable.

Run it without parameters to see the available actions, try 'pear list'
to see what packages are installed, or 'pear help' for help.

For more information about PEAR, see:


Thanks for using go-pear!

How do I fix these Warnings?

  • Isn't Pear in the default repositories, or at least a compatible PPA (if Kali has those)? Is there no Pear install guide that suggests how to proceed? – Xen2050 Nov 20 '18 at 7:38
  • It should have been in the default repository. But pear command was not running earlier. So I installed Pear using .phar file. But now I get this Warning. – Gautam Vashisht Nov 20 '18 at 8:12
  • If the default version was broken, then maybe whatever broke it is still breaking this other version – Xen2050 Nov 20 '18 at 8:14
  • I have solved the PHP Startup Warnings by commenting the extension= lines in php.ini file. But I still don't know the solution of older version of Pear Warning. – Gautam Vashisht Nov 20 '18 at 8:16

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.