Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

busybox curl install: bash is found && bash: command: not found #1234

Closed
ProBackup-nl opened this issue Feb 4, 2018 · 7 comments
Closed

Comments

@ProBackup-nl
Copy link

ProBackup-nl commented Feb 4, 2018

Steps to reproduce

$ curl https://get.acme.sh | sh
[Sun Feb  4 11:15:34 CET 2018] Downloading https://github.com/Neilpang/acme.sh/archive/master.tar.gz
[Sun Feb  4 11:15:35 CET 2018] Extracting master.tar.gz
...
[Sun Feb  4 11:15:37 CET 2018] Good, bash is found, so change the shebang to use bash as preferred.
bash: command: not found
[Sun Feb  4 11:15:51 CET 2018] OK
[Sun Feb  4 11:15:51 CET 2018] Install success!

$ ls -l /bin/bash
/bin/bash -> busybox
$ head -3 ~/.acme.sh/acme.sh
#!

VER=2.7.6
...
@ProBackup-nl ProBackup-nl changed the title busybox: bash is found && bash: command: not found busybox curl install: bash is found && bash: command: not found Feb 4, 2018
@Neilpang
Copy link
Member

Neilpang commented Feb 5, 2018

sorry, it's fixed.

please try again with the latest dev branch:

export BRANCH=dev
curl https://get.acme.sh  | sh

@ProBackup-nl
Copy link
Author

ProBackup-nl commented Feb 6, 2018

@Neilpang I don't see the fix (yet):

# export BRANCH=dev
# curl https://get.acme.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   705  100   705    0     0    705      0  0:00:01  0:00:01 --:--:--   647
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  156k  100  156k    0     0   156k      0  0:00:01 --:--:--  0:00:01  621k
[Tue Feb  6 18:29:27 UTC 2018] Installing from online archive.
[Tue Feb  6 18:29:27 UTC 2018] Downloading https://github.com/Neilpang/acme.sh/archive/dev.tar.gz
[Tue Feb  6 18:29:29 UTC 2018] Extracting dev.tar.gz
[Tue Feb  6 18:29:29 UTC 2018] It is recommended to install socat first.
[Tue Feb  6 18:29:29 UTC 2018] We use socat for standalone server if you use standalone mode.
[Tue Feb  6 18:29:29 UTC 2018] If you don't use standalone mode, just ignore this warning.
[Tue Feb  6 18:29:29 UTC 2018] Installing to /home/admin/.acme.sh
[Tue Feb  6 18:29:29 UTC 2018] Installed to /home/admin/.acme.sh/acme.sh
[Tue Feb  6 18:29:29 UTC 2018] Installing alias to '/home/admin/.profile'
[Tue Feb  6 18:29:29 UTC 2018] OK, Close and reopen your terminal to start using acme.sh
[Tue Feb  6 18:29:29 UTC 2018] Installing cron job
[Tue Feb  6 18:29:30 UTC 2018] Good, bash is found, so change the shebang to use bash as preferred.
bash: command: not found
[Tue Feb  6 18:29:30 UTC 2018] OK
# bash --help
bash --help
BusyBox v1.24.2 (2016-12-10 16:01:57 CET) multi-call binary.

Usage: bash [-/+OPTIONS] [-/+o OPT]... [-c 'SCRIPT' [ARG0 [ARGS]] / FILE [ARGS]]

Unix shell interpreter

@ProBackup-nl
Copy link
Author

ProBackup-nl commented Feb 6, 2018

No wonder, this busybox doesn't support the command command:

# command -v bash
-sh: command: not found

Neither does busybox its feature-limited "bash" shell support the command command:

# bash -c 'command -v bash'
bash: command: not found

Note:

# which bash
/bin/bash

Neilpang pushed a commit that referenced this issue Feb 7, 2018
@Neilpang
Copy link
Member

Neilpang commented Feb 7, 2018

@ProBackup-nl

fixed, please try again.

export BRANCH=dev
curl https://get.acme.sh  | sh

@ProBackup-nl
Copy link
Author

@Neilpang I don't think that 694af4a will fix the issue:

$ bash -c "command -v bash 2>/dev/null"
$ bash -c '/bin/sh'


BusyBox v1.24.2 (2017-11-11 17:20:38 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

@Neilpang
Copy link
Member

Neilpang commented Feb 7, 2018

@ProBackup-nl
please just try the code and show me the result.

@ProBackup-nl
Copy link
Author

[Wed Feb  7 19:32:59 UTC 2018] Good, bash is found, so change the shebang to use bash as preferred.
[Wed Feb  7 19:33:00 UTC 2018] OK
[Wed Feb  7 19:33:00 UTC 2018] Install success!
# head -1 acme.sh
#!/bin/sh

Well done, fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants