nvm
nvm copied to clipboard
MacOS error with GNU coreutils: Symbol not found: (_mkfifoat)
Operating system and version:
Intel MacOS 12.6.3
nvm debug
output:
$ nvm debug
nvm --version: v0.39.3
$TERM_PROGRAM: iTerm.app
$SHELL: /bin/bash
$SHLVL: 1
whoami: 'jeff'
${HOME}: /Users/jeff
${NVM_DIR}: '${HOME}/.nvm'
${PATH}: ${NVM_DIR}/versions/node/v16.18.0/bin:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/Applications/MySQLWorkbench.app/Contents/MacOS
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin21)'
uname -a: 'Darwin 21.6.0 Darwin Kernel Version 21.6.0: Mon Dec 19 20:44:01 PST 2022; root:xnu-8020.240.18~2/RELEASE_X86_64 x86_64 i386 Darwin'
checksum binary: 'sha256sum'
OS version: macOS 12.6.3 21G419
awk: /usr/bin/awk, awk version 20200816
curl: /usr/bin/curl, curl 7.79.1 (x86_64-apple-darwin21.0) libcurl/7.79.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.45.1
wget: /usr/local/bin/wget, GNU Wget 1.21.3 built on darwin22.1.0.
sed: /usr/bin/sed
cut: /usr/local/opt/coreutils/libexec/gnubin/cut
basename: /usr/local/opt/coreutils/libexec/gnubin/basename
rm: /usr/local/opt/coreutils/libexec/gnubin/rm (rm -iv)
mkdir: /usr/local/opt/coreutils/libexec/gnubin/mkdir (mkdir -pv)
xargs: /usr/bin/xargs
git: /usr/local/bin/git, git version 2.39.2
grep: /usr/bin/grep (grep --color=auto), grep (BSD grep, GNU compatible) 2.6.0-FreeBSD
nvm current: v16.18.0
which node: ${NVM_DIR}/versions/node/v16.18.0/bin/node
which iojs:
which npm: ${NVM_DIR}/versions/node/v16.18.0/bin/npm
npm config get prefix: ${NVM_DIR}/versions/node/v16.18.0
npm root -g: ${NVM_DIR}/versions/node/v16.18.0/lib/node_modules
nvm ls
output:
-> v16.18.0
v16.19.1
v18.14.2
default -> node (-> v18.14.2)
iojs -> N/A (default)
unstable -> N/A (default)
node -> stable (-> v18.14.2) (default)
stable -> 18.14 (-> v18.14.2) (default)
lts/* -> lts/hydrogen (-> N/A)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.24.1 (-> N/A)
lts/erbium -> v12.22.12 (-> N/A)
lts/fermium -> v14.21.3 (-> N/A)
lts/gallium -> v16.19.1 (-> N/A)
lts/hydrogen -> v18.14.2 (-> N/A)
How did you install nvm
?
Install script via curl
What steps did you perform?
Trying to install newer version of node
What happened?
Received the following error when trying to install a newer version of node. I received this error on both v16.19.1 and v18.14.2:
$ nvm install -b v18.14.2
Downloading and installing node v18.14.2...
Downloading https://nodejs.org/dist/v18.14.2/node-v18.14.2-darwin-x64.tar.xz...
######################################################################################################################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
dyld[83207]: Symbol not found: (_mkfifoat)
Referenced from: '/usr/local/Cellar/coreutils/9.1/bin/gmv'
Expected in: '/usr/lib/libSystem.B.dylib'
Abort trap: 6
Binary download failed. Download from source aborted.
N/A: version "v18.14.2" is not yet installed.
You need to run `nvm install v18.14.2` to install and use it.
I was able to fix this by removing GNU coreutils
from my path, but wanted to bring this to your attention.
What did you expect to happen?
Expected install to work as before
Is there anything in any of your profile files that modifies the PATH
?
Yes, see output of nvm debug
above
If you are having installation issues, or getting "N/A", what does curl -I --compressed -v https://nodejs.org/dist/
print out?
$ curl -I --compressed -v https://nodejs.org/dist/
* Trying 2606:4700:10::6814:172e:443...
* Connected to nodejs.org (2606:4700:10::6814:172e) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
* CApath: none
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-AES256-GCM-SHA384
* ALPN, server accepted to use h2
* Server certificate:
* subject: CN=*.nodejs.org
* start date: Feb 3 00:00:00 2023 GMT
* expire date: Mar 5 23:59:59 2024 GMT
* subjectAltName: host "nodejs.org" matched cert's "nodejs.org"
* issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA Domain Validation Secure Server CA
* SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x7fdd2e812c00)
> HEAD /dist/ HTTP/2
> Host: nodejs.org
> user-agent: curl/7.79.1
> accept: */*
> accept-encoding: deflate, gzip
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
< HTTP/2 200
HTTP/2 200
< date: Mon, 27 Feb 2023 19:42:14 GMT
date: Mon, 27 Feb 2023 19:42:14 GMT
< content-type: text/html
content-type: text/html
< last-modified: Mon, 27 Feb 2023 16:06:11 GMT
last-modified: Mon, 27 Feb 2023 16:06:11 GMT
< cache-control: max-age=14400
cache-control: max-age=14400
< cf-cache-status: HIT
cf-cache-status: HIT
< age: 12658
age: 12658
< vary: Accept-Encoding
vary: Accept-Encoding
< strict-transport-security: max-age=31536000; includeSubDomains; preload
strict-transport-security: max-age=31536000; includeSubDomains; preload
< x-content-type-options: nosniff
x-content-type-options: nosniff
< server: cloudflare
server: cloudflare
< cf-ray: 7a03670b6b8d7c95-LAX
cf-ray: 7a03670b6b8d7c95-LAX
< content-encoding: gzip
content-encoding: gzip
<
* Connection #0 to host nodejs.org left intact
That's very confusing. Does GNU coreutils provide curl or wget? Is the nvm debug output below from when coreutils is present? (that's what i'd want to see)
The details are all from when I had coreutils in my path. It's the second item in my PATH variable in the nvm debug
output. I noticed some other issues that mentioned coreutils, so I decided to remove it from my path on a whim -- and it worked! But, I've had coreutils installed for a long time and never had any problems in the past.
I see cut, basename, rm, and mkdir as being taken from coreutils, in particular.
Is there any chance these aren't POSIX-compliant? I don't know what gmv
is but perhaps those 4 things call into it.
curl
and wget
are not in coreutils. curl
comes with MacOS, but I installed wget
using Homebrew, also. Below are the links created by coreutils. It looks like gmv
is the GNU version of mv
.
[2023-02-27 13:30:35]-[jeff@JMBP]-[/usr/local/Cellar/coreutils/9.1/libexec/gnubin]
$ ll
total 0
drwxr-xr-x 108 jeff staff 3.4K Apr 15 2022 ./
drwxr-xr-x 6 jeff staff 192B Apr 15 2022 ../
lrwxr-xr-x 1 jeff staff 12B Apr 15 2022 [@ -> ../../bin/g[
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 b2sum@ -> ../../bin/gb2sum
lrwxr-xr-x 1 jeff staff 17B Apr 15 2022 base32@ -> ../../bin/gbase32
lrwxr-xr-x 1 jeff staff 17B Apr 15 2022 base64@ -> ../../bin/gbase64
lrwxr-xr-x 1 jeff staff 19B Apr 15 2022 basename@ -> ../../bin/gbasename
lrwxr-xr-x 1 jeff staff 17B Apr 15 2022 basenc@ -> ../../bin/gbasenc
lrwxr-xr-x 1 jeff staff 14B Apr 15 2022 cat@ -> ../../bin/gcat
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 chcon@ -> ../../bin/gchcon
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 chgrp@ -> ../../bin/gchgrp
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 chmod@ -> ../../bin/gchmod
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 chown@ -> ../../bin/gchown
lrwxr-xr-x 1 jeff staff 17B Apr 15 2022 chroot@ -> ../../bin/gchroot
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 cksum@ -> ../../bin/gcksum
lrwxr-xr-x 1 jeff staff 15B Apr 15 2022 comm@ -> ../../bin/gcomm
lrwxr-xr-x 1 jeff staff 13B Apr 15 2022 cp@ -> ../../bin/gcp
lrwxr-xr-x 1 jeff staff 17B Apr 15 2022 csplit@ -> ../../bin/gcsplit
lrwxr-xr-x 1 jeff staff 14B Apr 15 2022 cut@ -> ../../bin/gcut
lrwxr-xr-x 1 jeff staff 15B Apr 15 2022 date@ -> ../../bin/gdate
lrwxr-xr-x 1 jeff staff 13B Apr 15 2022 dd@ -> ../../bin/gdd
lrwxr-xr-x 1 jeff staff 13B Apr 15 2022 df@ -> ../../bin/gdf
lrwxr-xr-x 1 jeff staff 14B Apr 15 2022 dir@ -> ../../bin/gdir
lrwxr-xr-x 1 jeff staff 20B Apr 15 2022 dircolors@ -> ../../bin/gdircolors
lrwxr-xr-x 1 jeff staff 18B Apr 15 2022 dirname@ -> ../../bin/gdirname
lrwxr-xr-x 1 jeff staff 13B Apr 15 2022 du@ -> ../../bin/gdu
lrwxr-xr-x 1 jeff staff 15B Apr 15 2022 echo@ -> ../../bin/gecho
lrwxr-xr-x 1 jeff staff 14B Apr 15 2022 env@ -> ../../bin/genv
lrwxr-xr-x 1 jeff staff 17B Apr 15 2022 expand@ -> ../../bin/gexpand
lrwxr-xr-x 1 jeff staff 15B Apr 15 2022 expr@ -> ../../bin/gexpr
lrwxr-xr-x 1 jeff staff 17B Apr 15 2022 factor@ -> ../../bin/gfactor
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 false@ -> ../../bin/gfalse
lrwxr-xr-x 1 jeff staff 14B Apr 15 2022 fmt@ -> ../../bin/gfmt
lrwxr-xr-x 1 jeff staff 15B Apr 15 2022 fold@ -> ../../bin/gfold
lrwxr-xr-x 1 jeff staff 17B Apr 15 2022 groups@ -> ../../bin/ggroups
lrwxr-xr-x 1 jeff staff 15B Apr 15 2022 head@ -> ../../bin/ghead
lrwxr-xr-x 1 jeff staff 17B Apr 15 2022 hostid@ -> ../../bin/ghostid
lrwxr-xr-x 1 jeff staff 13B Apr 15 2022 id@ -> ../../bin/gid
lrwxr-xr-x 1 jeff staff 18B Apr 15 2022 install@ -> ../../bin/ginstall
lrwxr-xr-x 1 jeff staff 15B Apr 15 2022 join@ -> ../../bin/gjoin
lrwxr-xr-x 1 jeff staff 15B Apr 15 2022 kill@ -> ../../bin/gkill
lrwxr-xr-x 1 jeff staff 15B Apr 15 2022 link@ -> ../../bin/glink
lrwxr-xr-x 1 jeff staff 13B Apr 15 2022 ln@ -> ../../bin/gln
lrwxr-xr-x 1 jeff staff 18B Apr 15 2022 logname@ -> ../../bin/glogname
lrwxr-xr-x 1 jeff staff 13B Apr 15 2022 ls@ -> ../../bin/gls
lrwxr-xr-x 1 jeff staff 17B Apr 15 2022 md5sum@ -> ../../bin/gmd5sum
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 mkdir@ -> ../../bin/gmkdir
lrwxr-xr-x 1 jeff staff 17B Apr 15 2022 mkfifo@ -> ../../bin/gmkfifo
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 mknod@ -> ../../bin/gmknod
lrwxr-xr-x 1 jeff staff 17B Apr 15 2022 mktemp@ -> ../../bin/gmktemp
lrwxr-xr-x 1 jeff staff 13B Apr 15 2022 mv@ -> ../../bin/gmv
lrwxr-xr-x 1 jeff staff 15B Apr 15 2022 nice@ -> ../../bin/gnice
lrwxr-xr-x 1 jeff staff 13B Apr 15 2022 nl@ -> ../../bin/gnl
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 nohup@ -> ../../bin/gnohup
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 nproc@ -> ../../bin/gnproc
lrwxr-xr-x 1 jeff staff 17B Apr 15 2022 numfmt@ -> ../../bin/gnumfmt
lrwxr-xr-x 1 jeff staff 13B Apr 15 2022 od@ -> ../../bin/god
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 paste@ -> ../../bin/gpaste
lrwxr-xr-x 1 jeff staff 18B Apr 15 2022 pathchk@ -> ../../bin/gpathchk
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 pinky@ -> ../../bin/gpinky
lrwxr-xr-x 1 jeff staff 13B Apr 15 2022 pr@ -> ../../bin/gpr
lrwxr-xr-x 1 jeff staff 19B Apr 15 2022 printenv@ -> ../../bin/gprintenv
lrwxr-xr-x 1 jeff staff 17B Apr 15 2022 printf@ -> ../../bin/gprintf
lrwxr-xr-x 1 jeff staff 14B Apr 15 2022 ptx@ -> ../../bin/gptx
lrwxr-xr-x 1 jeff staff 14B Apr 15 2022 pwd@ -> ../../bin/gpwd
lrwxr-xr-x 1 jeff staff 19B Apr 15 2022 readlink@ -> ../../bin/greadlink
lrwxr-xr-x 1 jeff staff 19B Apr 15 2022 realpath@ -> ../../bin/grealpath
lrwxr-xr-x 1 jeff staff 13B Apr 15 2022 rm@ -> ../../bin/grm
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 rmdir@ -> ../../bin/grmdir
lrwxr-xr-x 1 jeff staff 17B Apr 15 2022 runcon@ -> ../../bin/gruncon
lrwxr-xr-x 1 jeff staff 14B Apr 15 2022 seq@ -> ../../bin/gseq
lrwxr-xr-x 1 jeff staff 18B Apr 15 2022 sha1sum@ -> ../../bin/gsha1sum
lrwxr-xr-x 1 jeff staff 20B Apr 15 2022 sha224sum@ -> ../../bin/gsha224sum
lrwxr-xr-x 1 jeff staff 20B Apr 15 2022 sha256sum@ -> ../../bin/gsha256sum
lrwxr-xr-x 1 jeff staff 20B Apr 15 2022 sha384sum@ -> ../../bin/gsha384sum
lrwxr-xr-x 1 jeff staff 20B Apr 15 2022 sha512sum@ -> ../../bin/gsha512sum
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 shred@ -> ../../bin/gshred
lrwxr-xr-x 1 jeff staff 15B Apr 15 2022 shuf@ -> ../../bin/gshuf
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 sleep@ -> ../../bin/gsleep
lrwxr-xr-x 1 jeff staff 15B Apr 15 2022 sort@ -> ../../bin/gsort
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 split@ -> ../../bin/gsplit
lrwxr-xr-x 1 jeff staff 15B Apr 15 2022 stat@ -> ../../bin/gstat
lrwxr-xr-x 1 jeff staff 17B Apr 15 2022 stdbuf@ -> ../../bin/gstdbuf
lrwxr-xr-x 1 jeff staff 15B Apr 15 2022 stty@ -> ../../bin/gstty
lrwxr-xr-x 1 jeff staff 14B Apr 15 2022 sum@ -> ../../bin/gsum
lrwxr-xr-x 1 jeff staff 15B Apr 15 2022 sync@ -> ../../bin/gsync
lrwxr-xr-x 1 jeff staff 14B Apr 15 2022 tac@ -> ../../bin/gtac
lrwxr-xr-x 1 jeff staff 15B Apr 15 2022 tail@ -> ../../bin/gtail
lrwxr-xr-x 1 jeff staff 14B Apr 15 2022 tee@ -> ../../bin/gtee
lrwxr-xr-x 1 jeff staff 15B Apr 15 2022 test@ -> ../../bin/gtest
lrwxr-xr-x 1 jeff staff 18B Apr 15 2022 timeout@ -> ../../bin/gtimeout
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 touch@ -> ../../bin/gtouch
lrwxr-xr-x 1 jeff staff 13B Apr 15 2022 tr@ -> ../../bin/gtr
lrwxr-xr-x 1 jeff staff 15B Apr 15 2022 true@ -> ../../bin/gtrue
lrwxr-xr-x 1 jeff staff 19B Apr 15 2022 truncate@ -> ../../bin/gtruncate
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 tsort@ -> ../../bin/gtsort
lrwxr-xr-x 1 jeff staff 14B Apr 15 2022 tty@ -> ../../bin/gtty
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 uname@ -> ../../bin/guname
lrwxr-xr-x 1 jeff staff 19B Apr 15 2022 unexpand@ -> ../../bin/gunexpand
lrwxr-xr-x 1 jeff staff 15B Apr 15 2022 uniq@ -> ../../bin/guniq
lrwxr-xr-x 1 jeff staff 17B Apr 15 2022 unlink@ -> ../../bin/gunlink
lrwxr-xr-x 1 jeff staff 17B Apr 15 2022 uptime@ -> ../../bin/guptime
lrwxr-xr-x 1 jeff staff 16B Apr 15 2022 users@ -> ../../bin/gusers
lrwxr-xr-x 1 jeff staff 15B Apr 15 2022 vdir@ -> ../../bin/gvdir
lrwxr-xr-x 1 jeff staff 13B Apr 15 2022 wc@ -> ../../bin/gwc
lrwxr-xr-x 1 jeff staff 14B Apr 15 2022 who@ -> ../../bin/gwho
lrwxr-xr-x 1 jeff staff 17B Apr 15 2022 whoami@ -> ../../bin/gwhoami
lrwxr-xr-x 1 jeff staff 14B Apr 15 2022 yes@ -> ../../bin/gyes
ahhh ok, so it's mv
that's calling into that - and there's no way for nvm to bypass it since it's done with symlinks instead of aliasing. I'm not really sure what to do here other than add something to "troubleshooting" :-/
It's not a huge deal, more of an inconvenience. As I said, I just took coreutils out of my path and it worked. I re-enabled coreutils after the upgrade was done. I just wanted to document it here, so you would know about it and anyone else with the same problem could find it.
I suppose you could call /bin/mv
directly, to bypass the symlinks, but that's up to you. Thanks!
Unfortunately there's no guarantee that mv
is installed in that path - default installation paths vary widely by system.
It'd be ideal if you could file an issue on gnu coreutils, since there's clearly something about their mv
implementation that isn't posix-compliant. Otherwise, I'll leave this open as a reminder to add a troubleshooting note about it. Thanks for reporting!