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

wget: unrecognized option: progress=bar #2135

Open
sbfkcel opened this issue Dec 14, 2019 · 19 comments
Open

wget: unrecognized option: progress=bar #2135

sbfkcel opened this issue Dec 14, 2019 · 19 comments

Comments

@sbfkcel
Copy link

sbfkcel commented Dec 14, 2019

alpine

/tmp # nvm install 12.13.0
Downloading and installing node v12.13.0...
Downloading https://nodejs.org/dist/v12.13.0/node-v12.13.0-linux-x64.tar.gz...
wget: unrecognized option: progress=bar
BusyBox v1.30.1 (2019-06-12 17:51:55 UTC) multi-call binary.

Usage: wget [-c|--continue] [--spider] [-q|--quiet] [-O|--output-document FILE]
[--header 'header: value'] [-Y|--proxy on/off] [-P DIR]
[-S|--server-response] [-U|--user-agent AGENT] [-T SEC] URL...

Retrieve files via HTTP or FTP

@sbfkcel
Copy link
Author

sbfkcel commented Dec 14, 2019

Added: alpine system is not supported

@ljharb
Copy link
Member

ljharb commented Dec 14, 2019

You'll want to install a proper wget, or curl, if you're using alpine. See https://github.com/nvm-sh/nvm#installing-nvm-on-alpine-linux

@sbfkcel
Copy link
Author

sbfkcel commented Dec 15, 2019

@Lilja
image

@ljharb
Copy link
Member

ljharb commented Dec 15, 2019

That’s strange; do you have a PREFIX env var set? What does nvm debug print out?

@sbfkcel
Copy link
Author

sbfkcel commented Dec 16, 2019

/ # nvm debug
nvm --version: v0.35.1
$SHELL:
$SHLVL: 1
${HOME}: /root
${NVM_DIR}: '${HOME}/.nvm'
${PATH}: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
sh: --version: not found
shell version: ''
uname -a: 'Linux 4.9.184-linuxkit #1 SMP Tue Jul 2 22:58:16 UTC 2019 x86_64 GNU/Linux'
OS version: Welcome to Alpine Linux 3.10
curl: /usr/bin/curl, curl 7.66.0 (x86_64-alpine-linux-musl) libcurl/7.66.0 OpenSSL/1.1.1d zlib/1.2.11 nghttp2/1.39.2
wget: unrecognized option: V
BusyBox v1.30.1 (2019-06-12 17:51:55 UTC) multi-call binary.

Usage: wget [-c|--continue] [--spider] [-q|--quiet] [-O|--output-document FILE]
	[--header 'header: value'] [-Y|--proxy on/off] [-P DIR]
	[-S|--server-response] [-U|--user-agent AGENT] [-T SEC] URL...

Retrieve files via HTTP or FTP

	--spider	Only check URL existence: $? is 0 if exists
	-c		Continue retrieval of aborted transfer
	-q		Quiet
	-P DIR		Save to DIR (default .)
	-S    		Show server response
	-T SEC		Network read timeout is SEC seconds
	-O FILE		Save to FILE ('-' for stdout)
	-U STR		Use STR for User-Agent header
	-Y on/off	Use proxy
wget: /usr/bin/wget,
git: not found
grep: /bin/grep, grep (GNU grep) 3.3
awk: /usr/bin/awk, BusyBox v1.30.1 (2019-06-12 17:51:55 UTC) multi-call binary.
sed: /bin/sed, BusyBox v1.30.1 (2019-06-12 17:51:55 UTC) multi-call binary.
cut: /usr/bin/cut, cut (GNU coreutils) 8.31
basename: /usr/bin/basename, basename (GNU coreutils) 8.31
rm: /bin/rm, rm (GNU coreutils) 8.31
mkdir: /bin/mkdir, mkdir (GNU coreutils) 8.31
xargs: /usr/bin/xargs, xargs (GNU findutils) 4.6.0
nvm current: none
which node:
which iojs:
which npm:
npm config get prefix: sh: npm: not found
npm root -g: sh: npm: not found

@ljharb
Copy link
Member

ljharb commented Dec 16, 2019

While it's strange to be running nvm as root, that should work fine.

It looks like you have wget v1.30.1; https://www.gnu.org/software/wget/manual/html_node/Download-Options.html shows that it's in v1.18.

This seems like a duplicate of #1789.

@ljharb ljharb closed this as completed Dec 16, 2019
@sbfkcel
Copy link
Author

sbfkcel commented Dec 16, 2019

Alpha silent user is root
In the end I chose to manually compile nodejs

@ljharb
Copy link
Member

ljharb commented Dec 16, 2019

That's fine; to get nvm working, you need a proper version of curl or wget or git.

@sbfkcel
Copy link
Author

sbfkcel commented Dec 16, 2019

In fact, curl and wget are working normally, it should be a compilation problem.

And there are binary files in ~ / .nvm / versions / node / v12.13.1 /, but they won't work.

~/.nvm/versions/node/v12.13.1/bin # curl -V
curl 7.66.0 (x86_64-alpine-linux-musl) libcurl/7.66.0 OpenSSL/1.1.1d zlib/1.2.11 nghttp2/1.39.2
Release-Date: 2019-09-11
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL TLS-SRP UnixSockets
~/.nvm/versions/node/v12.13.1/bin # ls
node  npm  npx
~/.nvm/versions/node/v12.13.1/bin # ./node
/bin/sh: ./node: not found
~/.nvm/versions/node/v12.13.1/bin # nvm use v12.13.1
env: ‘node’: No such file or directory
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `nvm use --delete-prefix v12.13.1` to unset it.
~/.nvm/versions/node/v12.13.1/bin #

@ljharb
Copy link
Member

ljharb commented Dec 16, 2019

Does wget support --progress=bar? If not, it's not a proper version of wget for the purposes of nvm.

@sbfkcel
Copy link
Author

sbfkcel commented Dec 16, 2019

Yes. I updated wget and already support --progress=bar

@sbfkcel
Copy link
Author

sbfkcel commented Dec 16, 2019

image

@ljharb
Copy link
Member

ljharb commented Dec 16, 2019

Ah ok, so this is a different issue.

node is invoked directly, not inside those dirs. What does nvm debug show now?

@ljharb ljharb reopened this Dec 16, 2019
@sbfkcel
Copy link
Author

sbfkcel commented Dec 16, 2019

~/.nvm/versions/node/v12.13.1/bin # ls
node  npm  npx
~/.nvm/versions/node/v12.13.1/bin # ./node
sh: ./node: not found
~/.nvm/versions/node/v12.13.1/bin # nvm debug
nvm --version: v0.35.1
$SHELL:
$SHLVL: 1
${HOME}: /root
${NVM_DIR}: '${HOME}/.nvm'
${PATH}: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
sh: --version: not found
shell version: ''
uname -a: 'Linux 4.9.184-linuxkit #1 SMP Tue Jul 2 22:58:16 UTC 2019 x86_64 GNU/Linux'
OS version: Welcome to Alpine Linux 3.10
curl: /usr/bin/curl, curl 7.66.0 (x86_64-alpine-linux-musl) libcurl/7.66.0 OpenSSL/1.1.1d zlib/1.2.11 nghttp2/1.39.2
wget: unrecognized option: V
BusyBox v1.30.1 (2019-06-12 17:51:55 UTC) multi-call binary.

Usage: wget [-c|--continue] [--spider] [-q|--quiet] [-O|--output-document FILE]
	[--header 'header: value'] [-Y|--proxy on/off] [-P DIR]
	[-S|--server-response] [-U|--user-agent AGENT] [-T SEC] URL...

Retrieve files via HTTP or FTP

	--spider	Only check URL existence: $? is 0 if exists
	-c		Continue retrieval of aborted transfer
	-q		Quiet
	-P DIR		Save to DIR (default .)
	-S    		Show server response
	-T SEC		Network read timeout is SEC seconds
	-O FILE		Save to FILE ('-' for stdout)
	-U STR		Use STR for User-Agent header
	-Y on/off	Use proxy
wget: /usr/bin/wget,
git: not found
grep: /bin/grep, grep (GNU grep) 3.3
awk: /usr/bin/awk, BusyBox v1.30.1 (2019-06-12 17:51:55 UTC) multi-call binary.
sed: /bin/sed, BusyBox v1.30.1 (2019-06-12 17:51:55 UTC) multi-call binary.
cut: /usr/bin/cut, cut (GNU coreutils) 8.31
basename: /usr/bin/basename, basename (GNU coreutils) 8.31
rm: /bin/rm, rm (GNU coreutils) 8.31
mkdir: /bin/mkdir, mkdir (GNU coreutils) 8.31
xargs: /usr/bin/xargs, xargs (GNU findutils) 4.6.0
nvm current: none
which node:
which iojs:
which npm:
npm config get prefix: sh: npm: not found
npm root -g: sh: npm: not found

@sbfkcel
Copy link
Author

sbfkcel commented Dec 16, 2019

alpine does not work with general-purpose Linux binaries. It needs to be recompiled. The cause of the failure should appear in the compilation process.

@ljharb
Copy link
Member

ljharb commented Dec 16, 2019

Have you followed all the alpine steps in the readme? https://github.com/nvm-sh/nvm#installing-nvm-on-alpine-linux

@sbfkcel
Copy link
Author

sbfkcel commented Dec 17, 2019

@ljharb Yes


Using nvm install xxx or nvm install xxx -s does not work.
Using mhart / alpine-node: xxx containers is of course possible.

@ljharb
Copy link
Member

ljharb commented Dec 18, 2019

What happens when you completely uninstall nvm, and run:

apk add -U curl bash ca-certificates openssl ncurses coreutils python2 make gcc g++ libgcc linux-headers grep util-linux binutils findutils
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash

?

@sbfkcel
Copy link
Author

sbfkcel commented Dec 18, 2019

nvm can be installed correctly

Just use the above situation.

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