Repository: nvm
Issue: MacOS error with GNU coreutils:  Symbol not found: (_mkfifoat)
Labels: informational,pull request wanted

<!-- Thank you for being interested in nvm! Please help us by filling out the following form if you‘re having trouble. If you have a feature request, or some other question, please feel free to clear out the form. Thanks! -->

#### Operating system and version:
Intel MacOS
12.6.3

#### `nvm debug` output:
<details>
<!-- do not delete the following blank line -->

```sh
$ 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
```
</details>

#### `nvm ls` output:
<details>
<!-- do not delete the following blank line -->

```sh
->     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)
```
</details>

#### How did you install `nvm`?
<!-- (e.g. install script in readme, Homebrew) -->
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:

```sh
$ 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`?
<!--  (e.g. `.bashrc`, `.bash_profile`, `.zshrc`, etc) -->
Yes, see output of `nvm debug` above

<!-- Please remove the following section if it does not apply to you -->
#### If you are having installation issues, or getting "N/A", what does `curl -I --compressed -v https://nodejs.org/dist/` print out?
<details>
<!-- do not delete the following blank line -->

```sh
$ 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
```
</details>