The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

pecl - command not found

Discussion in 'General Discussion' started by cookiesunshinex, Dec 10, 2009.

  1. cookiesunshinex

    cookiesunshinex Well-Known Member

    Joined:
    Jun 10, 2005
    Messages:
    77
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    When I try to run the following I get an error that command not found

    # pecl install uploadprogress

    Any ideas? I have tried through
    WHM
    Module Installers
    PHP Pecl > Manage
    List, but there are no packages found to install.

    Any ideas?
     
  2. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Please try the following paths for the command to access PECL:
    Code:
    /usr/local/bin/pecl
    /usr/bin/pecl
    If the error still persists, I would suspect the PHP installation of PEAR and PECL may be missing, incomplete, or otherwise broken in some form; to better determine where the issue may stem from it will help to know more information.

    Via root SSH access, please run each of the following commands and let us know the output that is displayed:
    Code:
    # grep -H '' /etc/*release /usr/local/cpanel/version
    # /usr/local/apache/bin/httpd -v
    # stat /usr/bin/php /usr/bin/pear /usr/bin/pecl
    # /usr/bin/php -v
    # /usr/bin/pear -V
    # /usr/bin/pecl -V
    # stat /usr/local/bin/php /usr/local/bin/pear /usr/local/bin/pecl
    # /usr/local/bin/php -v
    # /usr/local/bin/pear -V
    # /usr/local/bin/pecl -V
    To note, the commands for "pear -V" and "pecl -V" may output a line showing the server hostname; it's OK to munge the hostname to hide the real domain name.
     
  3. cookiesunshinex

    cookiesunshinex Well-Known Member

    Joined:
    Jun 10, 2005
    Messages:
    77
    Likes Received:
    0
    Trophy Points:
    6
    I did get it to install by running it from the exact location like below:
    # /usr/local/cpanel/3rdparty/bin/pecl install uploadprogress

    It installed the uploadprogress.so into the php extensions directory under /usr/local/cpanel though.


    Here are the results.

    root@host [~]# grep -H '' /etc/*release /usr/local/cpanel/version
    /etc/redhat-release:CentOS release 4.8 (Final)
    /usr/local/cpanel/version:11.24.5-RELEASE_38506

    root@host [~]# /usr/local/apache/bin/httpd -v
    Server version: Apache/2.2.14 (Unix)
    Server built: Dec 10 2009 16:39:31
    Cpanel::Easy::Apache v3.2.0 rev4899

    root@host [~]# stat /usr/bin/php /usr/bin/pear /usr/bin/pecl
    File: `/usr/bin/php'
    Size: 13687919 Blocks: 26776 IO Block: 4096 regular file
    Device: 303h/771d Inode: 87631 Links: 1
    Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
    Access: 2009-12-11 05:18:22.000000000 +0000
    Modify: 2009-12-10 16:50:02.000000000 +0000
    Change: 2009-12-10 16:50:02.000000000 +0000
    File: `/usr/bin/pear'
    Size: 636 Blocks: 8 IO Block: 4096 regular file
    Device: 303h/771d Inode: 81668 Links: 1
    Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
    Access: 2009-12-11 05:00:43.000000000 +0000
    Modify: 2006-05-30 15:28:12.000000000 +0000
    Change: 2006-05-30 15:28:12.000000000 +0000
    stat: cannot stat `/usr/bin/pecl': No such file or directory

    root@host [~]# /usr/bin/php -v
    PHP 5.2.9 (cgi) (built: Dec 10 2009 16:49:48)
    Copyright (c) 1997-2009 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
    with eAccelerator v0.9.6-rc1, Copyright (c) 2004-2007 eAccelerator, by eAccelerator

    root@host [~]# /usr/bin/pear -V
    PEAR Version: 1.3.6
    PHP Version: 5.2.9
    Zend Engine Version: 2.2.0
    Running on: Linux host.example.com 2.6.9-78.0.8.ELsmp #1 SMP Wed Nov 19 20:05:04 EST 2008 i686

    root@host [~]# /usr/bin/pecl -V
    -bash: /usr/bin/pecl: No such file or directory
    root@host [~]# stat /usr/local/bin/php /usr/local/bin/pear /usr/local/bin/pecl
    File: `/usr/local/bin/php'
    Size: 13693361 Blocks: 26792 IO Block: 4096 regular file
    Device: 303h/771d Inode: 64267 Links: 1
    Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
    Access: 2009-12-11 05:15:12.000000000 +0000
    Modify: 2009-12-10 16:45:28.000000000 +0000
    Change: 2009-12-10 16:45:28.000000000 +0000
    File: `/usr/local/bin/pear'
    Size: 666 Blocks: 8 IO Block: 4096 regular file
    Device: 303h/771d Inode: 67732 Links: 1
    Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
    Access: 2009-12-11 05:01:37.000000000 +0000
    Modify: 2006-02-08 12:31:40.000000000 +0000
    Change: 2006-02-08 12:31:40.000000000 +0000
    stat: cannot stat `/usr/local/bin/pecl': No such file or directory

    root@host [~]# /usr/local/bin/php -v
    PHP 5.2.9 (cli) (built: Dec 10 2009 16:45:21)
    Copyright (c) 1997-2009 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
    with eAccelerator v0.9.6-rc1, Copyright (c) 2004-2007 eAccelerator, by eAccelerator

    root@host [~]# /usr/local/bin/pear -V
    PEAR Version: 1.3.6
    PHP Version: 5.2.9
    Zend Engine Version: 2.2.0
    Running on: Linux host.example.com 2.6.9-78.0.8.ELsmp #1 SMP Wed Nov 19 20:05:04 EST 2008 i686

    root@host [~]# /usr/local/bin/pecl -V
    -bash: /usr/local/bin/pecl: No such file or directory
     
  4. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Thank you for the excellent details. Please use the following command to check information from the EasyApache build profiles; this will show if the PEAR build option was toggled from the default, where "0" is the default to include Pear and where "1" means it was toggled to not include PEAR:
    Code:
    # cd /var/cpanel/easy/apache && grep -HinR pear profile
    It will also help to run the following to check for a potential conflicting PHP RPM and related YUM log entries:
    Code:
    # rpm -qa --qf "%{name}-%{version}-%{release}.%{arch}.rpm\n" | grep -i "php" | sort
    # grep -i php /var/log/yum.log
    Assuming PEAR is enabled in the build profile settings in EasyApache, it is possible that the pecl script was removed at some point in the past, and if other components of the PHP installation of PEAR/PECL still remain this could cause the PHP install process to skip re-installing the scripts.

    While it is the command "pecl" instead of "pear" that is unavailable, the following documentation FAQ entry also explains why the script may not have been re-installed when PHP was last compiled:
    Error: "PEAR: command not found"

    To correct the problem PEAR (that includes PECL) can be manually installed (as referenced in the above documentation FAQ entry).

    As the system currently has the script "pear" please run both of the following commands in attempt to reinstall (and update) the PEAR install, that will include both scripts "pear" and "pecl"):
    Code:
    # /usr/bin/pear install -f PEAR-1.9.0
    # /usr/local/bin/pear install -f PEAR-1.9.0
    Please note the PEAR version number is current at the time of writing, but for future reference the PEAR download site should be referenced to obtain the latest version information:
    http://pear.php.net/package/PEAR/download

    After running the two commands shown above, please use the following commands to verify if the files are updated and if the command "pecl" is available:
    Code:
    # stat /usr/bin/pear /usr/bin/pecl /usr/local/bin/pear /usr/local/bin/pecl
    # /usr/bin/pear version
    # /usr/bin/pecl version
    # /usr/local/bin/pear version
    # /usr/local/bin/pecl version
     
    #4 cPanelDon, Dec 11, 2009
    Last edited: Dec 11, 2009
  5. cookiesunshinex

    cookiesunshinex Well-Known Member

    Joined:
    Jun 10, 2005
    Messages:
    77
    Likes Received:
    0
    Trophy Points:
    6
    Don,

    Merry Christmas and Happy Holidays. Thanks so much for the quick, thorough, and detailed response.

    The first two items checked out ok, but when I tried to manually run the install this is what I got

    Code:
    root@host [/var/cpanel/easy/apache]# /usr/bin/pear install -f PEAR-1.9.0
    Didn't receive 200 OK from remote server. (HTTP/1.1 410 Gone)
    root@host [/var/cpanel/easy/apache]# /usr/local/bin/pear install -f PEAR-1.9.0
    Didn't receive 200 OK from remote server. (HTTP/1.1 410 Gone)
    I performed an nslookup on pear.php.net which was successful.

    What other things can I check to see where I've got a bad entry or a mis-configuration?

    Thanks!
     
  6. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I would consider trying the steps in the following PEAR documentation FAQ that details how to upgrade beyond the installed PEAR version 1.3.6:
    http://pear.php.net/manual/en/faq.users.php#faq.no-handlers
    If the difficulty persists please consider submitting a support request so that we can take a closer look at the specific issue and the surrounding circumstances involved; when available, please PM me referencing this thread and your new ticket ID number so I may follow-up internally.
     
    #6 cPanelDon, Dec 11, 2009
    Last edited: Dec 11, 2009
  7. cookiesunshinex

    cookiesunshinex Well-Known Member

    Joined:
    Jun 10, 2005
    Messages:
    77
    Likes Received:
    0
    Trophy Points:
    6
    The instructions on their website wrong. This is how I got it to run. Notice that there are some very SMALL changes to the initial install instructions.

    Code:
    $ pear upgrade --force http://pear.php.net/get/PEAR-1.3.6.tgz http://download.pear.php.net/package/Archive_Tar-1.3.3.tgz http://pear.php.net/get/Console_Getopt-1.2.tgz
    
    upgrade ok: Console_Getopt 1.2
    upgrade ok: Archive_Tar 1.3.3
    Needed to change the Archive_Tar to download from download.pear.php.net, not pear.php.net

    Code:
    $ pear upgrade -a http://pear.php.net/get/PEAR-1.4.3.tar
    
    package `PEAR_Frontend_Web' version >= 0.5.0 is recommended to utilize some features.
    package `PEAR_Frontend_Gtk' version >= 0.4.0 is recommended to utilize some features.
    upgrade ok: PEAR 1.4.3
    Had to change the file name to .tar instead of .tgz

    Code:
    $ pear upgrade --force PEAR-1.4.11
    
    WARNING: channel "pear.php.net" has updated its protocols, use "channel-update pear.php.net" to update
    Did not download optional dependencies: pear/XML_RPC, use --alldeps to download automatically
    warning: pear/PEAR dependency package "pear/Archive_Tar" installed version 1.3.3 is not the recommended version 1.3.1
    warning: pear/PEAR dependency package "pear/Console_Getopt" downloaded version 1.2.3 is not the recommended version 1.2
    downloading PEAR-1.4.11.tgz ...
    Starting to download PEAR-1.4.11.tgz (283,272 bytes)
    ..........................................................done: 283,272 bytes
    downloading Console_Getopt-1.2.3.tgz ...
    Starting to download Console_Getopt-1.2.3.tgz (4,011 bytes)
    ...done: 4,011 bytes
    upgrade ok: channel://pear.php.net/Console_Getopt-1.2.3
    upgrade ok: channel://pear.php.net/PEAR-1.4.11
    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)
    Seemed to work ok.

    Code:
    $ pear upgrade PEAR
    
    root@host [~]# pear upgrade PEAR
    pear/PEAR dependency package "pear/Structures_Graph" downloaded version 1.0.3 is not the recommended version 1.0.2, but may be compatible, use --force to install
    downloading Structures_Graph-1.0.3.tgz ...
    Starting to download Structures_Graph-1.0.3.tgz (30,191 bytes)
    .........done: 30,191 bytes
    downloading XML_Util-1.2.1.tgz ...
    Starting to download XML_Util-1.2.1.tgz (17,729 bytes)
    ...done: 17,729 bytes
    upgrade ok: channel://pear.php.net/XML_Util-1.2.1
    upgrade ok: channel://pear.php.net/Structures_Graph-1.0.3
    Not sure why the strange Structures_graph error

    Code:
    $ pear upgrade
    
    root@host [~]# pear upgrade PEAR
    downloading PEAR-1.9.0.tgz ...
    Starting to download PEAR-1.9.0.tgz (291,634 bytes)
    ..................done: 291,634 bytes
    upgrade ok: channel://pear.php.net/PEAR-1.9.0
    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)
    To install use "pear install pear/PEAR#featurename"
    Code:
    root@host [~]# pear upgrade
    WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-update pear.php.net" to update
    downloading XML_RPC-1.5.2.tgz ...
    Starting to download XML_RPC-1.5.2.tgz (32,073 bytes)
    .........done: 32,073 bytes
    downloading Net_UserAgent_Detect-2.5.1.tgz ...
    Starting to download Net_UserAgent_Detect-2.5.1.tgz (11,750 bytes)
    ...done: 11,750 bytes
    downloading HTML_Template_IT-1.2.1.tgz ...
    Starting to download HTML_Template_IT-1.2.1.tgz (21,565 bytes)
    ...done: 21,565 bytes
    upgrade ok: channel://pear.php.net/XML_RPC-1.5.2
    upgrade ok: channel://pear.php.net/Net_UserAgent_Detect-2.5.1
    upgrade ok: channel://pear.php.net/HTML_Template_IT-1.2.1
    running pear upgrade a second time, got the XML_PRC

    Code:
    root@host [~]# pear upgrade
    Nothing to upgrade
    Now here is what I get when I run the commands again so see what versions everything is. Note "pear version" has changed to "pear -V"

    Code:
    root@host [~]# /usr/bin/pear -V
    PEAR Version: 1.3.6
    PHP Version: 5.2.9
    Zend Engine Version: 2.2.0
    Running on: Linux host.example.com 2.6.9-78.0.8.ELsmp #1 SMP Wed Nov 19 20:05:04 EST 2008 i686
    
    root@host [~]# /usr/local/bin/pear -V
    PEAR Version: 1.9.0
    PHP Version: 5.2.9
    Zend Engine Version: 2.2.0
    Running on: Linux host.example.com 2.6.9-78.0.8.ELsmp #1 SMP Wed Nov 19 20:05:04 EST 2008 i686
    
    root@host [~]# /usr/bin/pecl -V
    -bash: /usr/bin/pecl: No such file or directory
    
    root@host [~]# /usr/local/bin/pecl -V
    PEAR Version: 1.9.0
    PHP Version: 5.2.9
    Zend Engine Version: 2.2.0
    Running on: Linux host.example.com 2.6.9-78.0.8.ELsmp #1 SMP Wed Nov 19 20:05:04 EST 2008 i686
    Any ideas?
     
    #7 cookiesunshinex, Dec 12, 2009
    Last edited: Dec 12, 2009
  8. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Thank you for the excellent feedback.

    If entering the command "which pear" I believe the output may indicate the lone command "pear" used the copy of pear in the directory "/usr/local/bin" and hence only applied within the path "/usr/local".

    Please ensure to attempt the same corrective procedure but using the full path to "pear"; such as the following to have the update apply to the path within "/usr" (instead of "/usr/local" that is already completed):
    Code:
    # /usr/bin/pear
    Once that's done it should be back to normal based on the results provided thus far.
     
  9. cookiesunshinex

    cookiesunshinex Well-Known Member

    Joined:
    Jun 10, 2005
    Messages:
    77
    Likes Received:
    0
    Trophy Points:
    6
    Ok, thanks for the tip.

    1) Why are there two installs of Pear?

    2) I finally got /usr/bin/pear and pecl upgraded, but had a problem where everytime I tried to upgrade pear I kept getting an error message. I tried it several times, and finally just left it. I came back two or three hours later and it worked fine.

    Code:
    root@host [~]# /usr/bin/pear upgrade -a http://pear.php.net/get/PEAR-1.4.3.tar
    downloading PEAR-1.4.3.tar ...
    Starting to download PEAR-1.4.3.tar (-1 bytes)
    ..............done: 1,745,408 bytes
    Didn't receive 200 OK from remote server. (HTTP/1.1 410 Gone)
    
    3) Lastly, after upgrading to 1.4.3, I just ran /usr/bin/pear upgrade PEAR and it skipped 1.4.11 and went straight to 1.90. Is that ok?
     
  10. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    1.) They each belong to two different PHP binaries, one for CGI (in "/usr"), and the other for CLI (in "/usr/local"), as identified via the following commands:
    Code:
    # /usr/bin/php -v
    # /usr/local/bin/php -v
    3.) It is OK that PEAR was able to upgrade directly to the latest version.
     
  11. cookiesunshinex

    cookiesunshinex Well-Known Member

    Joined:
    Jun 10, 2005
    Messages:
    77
    Likes Received:
    0
    Trophy Points:
    6
    Thanks for the thorough and excellent direction and patience on this.

    My final questions is whether pear/pecl will automatically be updated via /scripts/upcp or yum update, etc.

    I'm guessing that the difficulty in upgrading had to do with the fact that I hadn't manually updated it for such a long time.
     
  12. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    You're welcome. :)

    I am not aware of an automatic method in a stock-default configuration unless a system administrator creates a script to accomplish custom updates using a scheduled cron tab entry. I would recommend using standard pear/pecl commands to accomplish updates instead of yum as yum would be for an RPM-based install that should not be used; the initial install of pear and pecl is provided at the time PHP is compiled from source when running EasyApache.
     
Loading...

Share This Page