Join the community today
Become a Member

[Solved] inc/wpsetup.inc: line 1879: wp: command not found

Discussion in 'Bug Reports' started by BLM, Jul 4, 2017.

  1. BLM

    BLM New Member

    18
    2
    3
    Jun 24, 2017
    Ratings:
    +3
    Local Time:
    10:03 PM
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.13.1
    • PHP Version Installed: 7.1.6
    • MariaDB MySQL Version Installed: 10.1.24
    • When was last time updated Centmin Mod code base ? : Today
    Hello, after upgrading my Centminmod to latest current branch (options 23 -> 2) i've this error when i try to add a new wordpress vhost:
    inc/wpsetup.inc: line 1879: wp: command not found
    inc/wpsetup.inc: line 1881: wp: command not found


    These are just some of the errors i get. All related to "wp: command not found".
    How i can fix that?
     
  2. BLM

    BLM New Member

    18
    2
    3
    Jun 24, 2017
    Ratings:
    +3
    Local Time:
    10:03 PM
    I noticed that during installation with option 22:

    Code:
    ------------------------------------------------------------
    Update wp-cli tool
    ------------------------------------------------------------
    updating...
    -------------------------------------------------------------
    update wp-cli packages
    Using Composer to update packages...
    ---
    Loading composer repositories with package information
    Updating dependencies
    Resolving dependencies through SAT
    Dependency resolution completed in 0.092 seconds
    Analyzed 4090 packages to resolve dependencies
    Analyzed 152495 rules to resolve dependencies
    Nothing to install or update
    Generating autoload files
    ---
    Success: Packages updated.
    -------------------------------------------------------------
    update wp-cli
    wget: illegal option -- `-n4'
    Usage: wget [OPTION]... [URL]...
    
    Try `wget --help' for more options.
    chmod: cannot access ‘/usr/bin/wp’: No such file or directory
    ./wpcli.sh: line 74: /usr/bin/wp: No such file or directory
    
    -------------------------------------------------------------
    wp-cli update completed
    Read http://wp-cli.org/ for full usage info
    -------------------------------------------------------------
    
     
  3. BLM

    BLM New Member

    18
    2
    3
    Jun 24, 2017
    Ratings:
    +3
    Local Time:
    10:03 PM
    After a reboot, if i try to install a vhost i get this:

    Code:
    ------------------------------------------------------------
    Installing wpcli.sh
    ------------------------------------------------------------
    installing...
    
    Error: /usr/bin/wp not found !!! Downloading now......
    wget: illegal option -- `-n4'
    Usage: wget [OPTION]... [URL]...
    
    Try `wget --help' for more options.
    Error: /usr/bin/wp download failed.
    
    -------------------------------------------------------------
    
     
  4. BLM

    BLM New Member

    18
    2
    3
    Jun 24, 2017
    Ratings:
    +3
    Local Time:
    10:03 PM
    I tried to manually install wp-cli and moved it into /usr/bin/wp, and "wp" command works without any problem. But when i run again centmin and try to install a vhost using option 22, centmin try to update again wp-cli with a wget error that overwrite /usr/bin/wp making "wp" command useless

    Code:
    ------------------------------------------------------------
    Update wp-cli tool
    ------------------------------------------------------------
    updating...
    -------------------------------------------------------------
    update wp-cli packages
    Using Composer to update packages...
    ---
    Loading composer repositories with package information
    Updating dependencies
    Resolving dependencies through SAT
    Dependency resolution completed in 0.081 seconds
    Analyzed 4090 packages to resolve dependencies
    Analyzed 152495 rules to resolve dependencies
    Nothing to install or update
    Generating autoload files
    ---
    Success: Packages updated.
    -------------------------------------------------------------
    update wp-cli
    wget: illegal option -- `-n4'
    Usage: wget [OPTION]... [URL]...
    
    Try `wget --help' for more options.
    chmod: cannot access ‘/usr/bin/wp’: No such file or directory
    ./wpcli.sh: line 74: /usr/bin/wp: No such file or directory
    
    -------------------------------------------------------------
    wp-cli update completed
    Read http://wp-cli.org/ for full usage info
    -------------------------------------------------------------
    
     
  5. eva2000

    eva2000 Administrator Staff Member

    55,400
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    6:03 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  6. BLM

    BLM New Member

    18
    2
    3
    Jun 24, 2017
    Ratings:
    +3
    Local Time:
    10:03 PM
  7. eva2000

    eva2000 Administrator Staff Member

    55,400
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    6:03 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    might need a fresh 123.09beta01 install as that bug broke a few other download areas that relied on wget. Only applies to you as you did a fresh install during the bug's existence (past 24hrs for for IPv4 connection for all wget & curl calls · centminmod/centminmod@38423af · GitHub). For 123.09beta01 users who installed prior to the bug, they can just do centmin.sh menu option 23, submenu option 2 update

    you can see the list of fixed areas in commit at fix wget -cnv4 · centminmod/centminmod@ee752b7 · GitHub
     
  8. BLM

    BLM New Member

    18
    2
    3
    Jun 24, 2017
    Ratings:
    +3
    Local Time:
    10:03 PM
    Damn... I've several websites that run into this server...
    Do you mean that i need to do a backup of every website, do a full wipe, fresh install then restore everything?

    This is a huge problem...
     
  9. eva2000

    eva2000 Administrator Staff Member

    55,400
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    6:03 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  10. BLM

    BLM New Member

    18
    2
    3
    Jun 24, 2017
    Ratings:
    +3
    Local Time:
    10:03 PM
    But this bug is a problem even for a running wordpress website? I mean, if a wordpress plugin or function must use a wget or curl, it will be bugged?
    Because if is a problem only for some install process i can start to working to a new vps and let this one running until i've the time to move everything i did
     
  11. eva2000

    eva2000 Administrator Staff Member

    55,400
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    6:03 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Good news, the damage from the wget bump is minimal for fresh installs, so came up with a quick script to fix up the missing stuff due to wget failing to download during the bug

    run command below to run wget-fix.sh which will patch up what's missing
    Code (Text):
    curl -sL https://gist.github.com/centminmod/eb59205e4a2b3ecc563fbcbc9af820a4/raw/wget-fix.sh | bash
    

    example output
    Code (Text):
    curl -sL https://gist.github.com/centminmod/eb59205e4a2b3ecc563fbcbc9af820a4/raw/wget-fix.sh | bash
    update centmin mod local code
    No local changes to save
    Already up-to-date.
    
    install wp-cli
    installing...
    
    2017-07-04 21:35:20 URL:http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz [12573228/12573228] -> "/usr/share/GeoIP/GeoLiteCity.dat.gz" [1]
    check /usr/share/GeoIP/GeoIPCity.dat
    -rw-r--r-- 1 root root 19M Jul  4 19:00 /usr/share/GeoIP/GeoIPCity.dat
    check pflogsumm command
    Postfix log summaries for Jul  4
    
    Grand Totals
    ------------
    messages
    
          0   received
          0   delivered
          0   forwarded
          0   deferred
          0   bounced
          0   rejected (0%)
          0   reject warnings
          0   held
          0   discarded (0%)
    
          0   bytes received
          0   bytes delivered
          0   senders
          0   sending hosts/domains
          0   recipients
          0   recipient hosts/domains
    
    
    Per-Hour Traffic Summary
    ------------------------
        time          received  delivered   deferred    bounced     rejected
        --------------------------------------------------------------------
        0000-0100           0          0          0          0          0 
        0100-0200           0          0          0          0          0 
        0200-0300           0          0          0          0          0 
        0300-0400           0          0          0          0          0 
        0400-0500           0          0          0          0          0 
        0500-0600           0          0          0          0          0 
        0600-0700           0          0          0          0          0 
        0700-0800           0          0          0          0          0 
        0800-0900           0          0          0          0          0 
        0900-1000           0          0          0          0          0 
        1000-1100           0          0          0          0          0 
        1100-1200           0          0          0          0          0 
        1200-1300           0          0          0          0          0 
        1300-1400           0          0          0          0          0 
        1400-1500           0          0          0          0          0 
        1500-1600           0          0          0          0          0 
        1600-1700           0          0          0          0          0 
        1700-1800           0          0          0          0          0 
        1800-1900           0          0          0          0          0 
        1900-2000           0          0          0          0          0 
        2000-2100           0          0          0          0          0 
        2100-2200           0          0          0          0          0 
        2200-2300           0          0          0          0          0 
        2300-2400           0          0          0          0          0 
    
    Host/Domain Summary: Message Delivery 
    --------------------------------------
     sent cnt  bytes   defers   avg dly max dly host/domain
     -------- -------  -------  ------- ------- -----------
    
    Host/Domain Summary: Messages Received 
    ---------------------------------------
     msg cnt   bytes   host/domain
     -------- -------  -----------
    
    Senders by message count: none
    
    Recipients by message count: none
    
    Senders by message size: none
    
    Recipients by message size: none
    
    message deferral detail: none
    
    message bounce detail (by relay): none
    
    message reject detail: none
    
    message reject warning detail: none
    
    message hold detail: none
    
    message discard detail: none
    
    smtp delivery failures: none
    
    Warnings: none
    
    Fatal Errors: none
    
    Panics: none
    
    Master daemon messages
    ----------------------
          1   daemon started -- version 2.10.1, configuration /etc/postfix
    
    fixes completed
    
     
  12. BLM

    BLM New Member

    18
    2
    3
    Jun 24, 2017
    Ratings:
    +3
    Local Time:
    10:03 PM
    Great! This is my output:

    Code:
    update centmin mod local code
    Nessuna modifica locale da salvare
    Already up-to-date.
    
    install wp-cli
    installing...
    
    2017-07-04 23:38:51 URL:http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz [12573228/12573228] -> "/usr/share/Geo                                IP/GeoLiteCity.dat.gz" [1]
    check /usr/share/GeoIP/GeoIPCity.dat
    -rw-r--r-- 1 root root 19M  4 lug 21.00 /usr/share/GeoIP/GeoIPCity.dat
    check pflogsumm command
    Postfix log summaries for Jul  4
    
    Grand Totals
    ------------
    messages
    
         45   received
         45   delivered
          0   forwarded
          0   deferred
          0   bounced
          0   rejected (0%)
          0   reject warnings
          0   held
          0   discarded (0%)
    
      76339   bytes received
      76339   bytes delivered
          4   senders
          2   sending hosts/domains
          3   recipients
          2   recipient hosts/domains
    
    
    Per-Hour Traffic Summary
    ------------------------
        time          received  delivered   deferred    bounced     rejected
        --------------------------------------------------------------------
        0000-0100           1          1          0          0          0
        0100-0200           3          3          0          0          0
        0200-0300           0          0          0          0          0
        0300-0400           0          0          0          0          0
        0400-0500           0          0          0          0          0
        0500-0600           0          0          0          0          0
        0600-0700           4          4          0          0          0
        0700-0800           0          0          0          0          0
        0800-0900           0          0          0          0          0
        0900-1000           0          0          0          0          0
        1000-1100           5          5          0          0          0
        1100-1200           1          1          0          0          0
        1200-1300           0          0          0          0          0
        1300-1400           0          0          0          0          0
        1400-1500           0          0          0          0          0
        1500-1600           7          7          0          0          0
        1600-1700           5          5          0          0          0
        1700-1800           0          0          0          0          0
        1800-1900           0          0          0          0          0
        1900-2000           0          0          0          0          0
        2000-2100           1          1          0          0          0
        2100-2200           8          8          0          0          0
        2200-2300           6          6          0          0          0
        2300-2400           4          4          0          0          0
    
    
    
    message deferral detail: none
    
    message bounce detail (by relay): none
    
    message reject detail: none
    
    message reject warning detail: none
    
    message hold detail: none
    
    message discard detail: none
    
    smtp delivery failures: none
    
    Warnings: none
    
    Fatal Errors: none
    
    Panics: none
    
    Master daemon messages
    ----------------------
          3   daemon started -- version 2.10.1, configuration /etc/postfix
    
    fixes completed
     
  13. eva2000

    eva2000 Administrator Staff Member

    55,400
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    6:03 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Looks good

    What's missing is just geoip database download, wp-cli install and pflogsumm command which is aliased via postfixlog command to report postfix daily stats for email i.e.
    Code (Text):
    postfixlog
    Postfix log summaries for Jul  4
    
    Grand Totals
    ------------
    messages
    
          0   received
          0   delivered
          0   forwarded
          0   deferred
          0   bounced
          0   rejected (0%)
          0   reject warnings
          0   held
          0   discarded (0%)
    
          0   bytes received
          0   bytes delivered
          0   senders
          0   sending hosts/domains
          0   recipients
          0   recipient hosts/domains
    
    
    Per-Hour Traffic Summary
    ------------------------
        time          received  delivered   deferred    bounced     rejected
        --------------------------------------------------------------------
        0000-0100           0          0          0          0          0 
        0100-0200           0          0          0          0          0 
        0200-0300           0          0          0          0          0 
        0300-0400           0          0          0          0          0 
        0400-0500           0          0          0          0          0 
        0500-0600           0          0          0          0          0 
        0600-0700           0          0          0          0          0 
        0700-0800           0          0          0          0          0 
        0800-0900           0          0          0          0          0 
        0900-1000           0          0          0          0          0 
        1000-1100           0          0          0          0          0 
        1100-1200           0          0          0          0          0 
        1200-1300           0          0          0          0          0 
        1300-1400           0          0          0          0          0 
        1400-1500           0          0          0          0          0 
        1500-1600           0          0          0          0          0 
        1600-1700           0          0          0          0          0 
        1700-1800           0          0          0          0          0 
        1800-1900           0          0          0          0          0 
        1900-2000           0          0          0          0          0 
        2000-2100           0          0          0          0          0 
        2100-2200           0          0          0          0          0 
        2200-2300           0          0          0          0          0 
        2300-2400           0          0          0          0          0 
    
    Host/Domain Summary: Message Delivery 
    --------------------------------------
     sent cnt  bytes   defers   avg dly max dly host/domain
     -------- -------  -------  ------- ------- -----------
    
    Host/Domain Summary: Messages Received 
    ---------------------------------------
     msg cnt   bytes   host/domain
     -------- -------  -----------
    
    Senders by message count: none
    
    Recipients by message count: none
    
    Senders by message size: none
    
    Recipients by message size: none
    
    message deferral detail: none
    
    message bounce detail (by relay): none
    
    message reject detail: none
    
    message reject warning detail: none
    
    message hold detail: none
    
    message discard detail: none
    
    smtp delivery failures: none
    
    Warnings: none
    
    Fatal Errors: none
    
    Panics: none
    
    Master daemon messages
    ----------------------
          1   daemon started -- version 2.10.1, configuration /etc/postfix
    
     
  14. eva2000

    eva2000 Administrator Staff Member

    55,400
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    6:03 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    @BLM i snipped out some of your posted output as it contained email addresses ;)
     
  15. BLM

    BLM New Member

    18
    2
    3
    Jun 24, 2017
    Ratings:
    +3
    Local Time:
    10:03 PM
    So i can be "safe"?
    I only installed one domain during this "bug". I can remove and install it again if is a problem, last domain installed before this one was like 2 weeks ago and didn't had any bug

    EDIT: thanks for the edits ;)
     
  16. eva2000

    eva2000 Administrator Staff Member

    55,400
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    6:03 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    all safe now :)