Nvm: Cannot install node on OpenBSD

Created on 11 Dec 2019  Â·  9Comments  Â·  Source: nvm-sh/nvm

Operating system and version:

OpenBSD 6.6

nvm debug output:


nvm --version: v0.35.1
$SHELL: /usr/local/bin/zsh
$SHLVL: 2
${NVM_DIR}: '${HOME}/.nvm'
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'zsh 5.7.1 (x86_64-unknown-openbsd6.6)'
uname -a: 'OpenBSD 6.6 GENERIC.MP#510 amd64'
curl: /usr/local/bin/curl, curl 7.67.0 (x86_64-unknown-openbsd6.6) libcurl/7.67.0 LibreSSL/3.0.2 zlib/1.2.3 nghttp2/1.40.0
wget: not found
git: /usr/local/bin/git, git version 2.24.0
ls: grep:: No such file or directory
grep: grep: aliased to grep  (grep), grep version 0.9
awk: /usr/bin/awk, awk: unknown option --version ignored
sed: /usr/bin/sed, sed: unknown option -- -
cut: /usr/bin/cut, cut: unknown option -- -
basename: /usr/bin/basename, basename: unknown option -- -
rm: /bin/rm, rm: unknown option -- -
mkdir: /bin/mkdir, mkdir: unknown option -- -
xargs: /usr/bin/xargs, xargs: unknown option -- -
nvm current: system
which node: /usr/local/bin/node
which iojs: iojs not found
which npm: /usr/local/bin/npm
npm config get prefix: /usr/local
npm root -g: /usr/local/lib/node_modules

nvm ls output:


->       system
iojs -> N/A (default)
node -> stable (-> N/A) (default)
unstable -> N/A (default)
lts/* -> lts/erbium (-> N/A)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.16.2 (-> N/A)
lts/dubnium -> v10.17.0 (-> N/A)
lts/erbium -> v12.13.1 (-> N/A)

How did you install nvm?


curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash

What steps did you perform?

nvm install 12

What happened?

tar does not recognize -J

Can not determine how many core(s) are available, running in single-threaded mode.                                                                                            
Please report an issue on GitHub to help us make nvm run faster on your computer!                                                                                             
Clang v3.5+ detected! CC or CXX not specified, will use Clang as C/C++ compiler!                                                                                              
Downloading https://nodejs.org/dist/v12.13.1/node-v12.13.1.tar.xz...                                                                                                          
####################################################################################################################################################################### 100.0%
Computing checksum with sha256 -q                                                                                                                                             
Checksums matched!                                                                                                                                                            
tar: unknown option -- J                                                                                                                                                      
usage: tar {crtux}[014578befHhjLmNOoPpqsvwXZz]                                                                                                                                
           [blocking-factor | archive | replstr] [-C directory] [-I file]                                                                                                     
           [file ...]                                                                                                                                                         
       tar {-crtux} [-014578eHhjLmNOoPpqvwXZz] [-b blocking-factor]                    
           [-C directory] [-f archive] [-I file] [-s replstr] [file ...]
nvm: install v12.13.1 failed!

What did you expect to happen?

Successfully install node version 12

Is there anything in any of your profile files that modifies the PATH?


N/A

FreeBSD / OpenBSD installing node

Most helpful comment

thanks! Please don't merge it. There're still disparities with the binary built from OBSD's ports. I need more time. Will keep you posted.

All 9 comments

See #1972.

@ljharb thanks for the direction. However, I am not interested in making the tar work with OBSD's native and his PR is half done which still fails to build node on OpenBSD.

My commit works on OBSD 6.6. nvm install 12 ran successfully and I am testing nvm install node now. Please refer to https://github.com/sihoang/nvm/commit/ea79f01e09b08df9da9d5fb838ed23ac187dc758

The dependencies for building already come with the gnome installation. But to make sure they're there pkg_add bash gtar gmake python2 libexecinfo

Do you think I should open a PR? I don't mind following up the procedures like adding automated test cases (if any)

If your commit is something that ostensibly builds on that PR, then i'd be happy to pull it into that PR. Adding tests would be excellent :-)

please correct me if I am wrong. Is it better to use the standard gnu-tar that works the same across all platforms? Why introduce another dependency i.e. OBSD's native tar which require maintaining effort if the OBSD team decide to change their native tar?

gtar is not standard - it's not in POSIX and it's not on many platforms.

Got it!

On Fri, Dec 13, 2019, 11:44 AM Jordan Harband notifications@github.com
wrote:

gtar is not standard - it's not in POSIX and it's not on many platforms.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nvm-sh/nvm/issues/2134?email_source=notifications&email_token=AGYRTNAXYLZ4TQGIUSQVKYTQYPQ3FA5CNFSM4JZJSNL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG3BVIQ#issuecomment-565582498,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGYRTNHUEQ3ALLOF3EG3AZLQYPQ3FANCNFSM4JZJSNLQ
.

@sihoang i've pulled your change into #1972; can you test it locally and confirm that that PR fixes the issue?

thanks! Please don't merge it. There're still disparities with the binary built from OBSD's ports. I need more time. Will keep you posted.

Note that it doesn’t have to be identical to an unofficial port, it just has to work properly :-) I’ll be happy to wait, to make sure we have it right. Thanks!

Was this page helpful?
0 / 5 - 0 ratings