Skip to content

nvm install command fails on FreeBSD #1552

@honzahommer

Description

@honzahommer
  • Operating system and version:
    FreeBSD nvm 11.0-RELEASE-p9 FreeBSD 11.0-RELEASE-p9 #0: Tue Apr 11 08:48:40 UTC 2017 [email protected]:/usr/obj/usr/src/sys/GENERIC amd64, clean install on Vultr.com, run as root user.

  • How did you install nvm? (e.g. install script in readme, homebrew):

$ wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
=> Downloading nvm from git to '/root/.nvm'
=> Cloning into '/root/.nvm'...
remote: Counting objects: 6436, done.
remote: Total 6436 (delta 0), reused 0 (delta 0), pack-reused 6435
Receiving objects: 100% (6436/6436), 1.89 MiB | 0 bytes/s, done.
Resolving deltas: 100% (3990/3990), done.
* (HEAD detached at v0.33.2)
  master
=> Compressing and cleaning up git repository
Counting objects: 6436, done.
Compressing objects: 100% (6392/6392), done.
Writing objects: 100% (6436/6436), done.
Total 6436 (delta 4250), reused 1980 (delta 0)

=> Appending nvm source string to /root/.profile
=> bash_completion source string already in /root/.profile
=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
  • What steps did you perform?
$ nvm install v8.1.0
  • What happened?
Currently, there is no binary for freebsd
Detected that you have 1 CPU core(s)
Number of CPU core(s) less than or equal to 2, running in single-threaded mode
Downloading https://nodejs.org/dist/v8.1.0/node-v8.1.0.tar.xz...
######################################################################## 100.0%
Computing checksum with shasum -a 256
Checksums matched!
$>./configure --prefix=/root/.nvm/versions/node/v8.1.0 <
WARNING: failed to autodetect C++ compiler version (CXX=g++)
WARNING: failed to autodetect C compiler version (CC=gcc)
Node.js configure error: No acceptable C compiler found!

        Please make sure you have a C compiler installed on your system and/or
        consider adjusting the CC environment variable if you installed
        it in a non-standard prefix.
        
Makefile:90: *** Missing or stale config.gypi, please run ./configure.  Stop.
nvm: install v8.1.0 failed!
  • Is there anything in any of your profile files (.bashrc, .bash_profile, .zshrc, etc) that modifies the PATH?
$ cat .profile 
# $FreeBSD: releng/11.0/etc/root/dot.profile 278616 2015-02-12 05:35:00Z cperciva $
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin
export PATH
HOME=/root
export HOME
TERM=${TERM:-xterm}
export TERM
PAGER=more
export PAGER
PS1="\$ "
export PS1

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
  • It looks, there is an issue with CC and CXX variables in nvm.sh. If I export these variables before installation, everything is OK.
$ export CC=cc  
$ export CXX=c++
$ nvm install v8.1.0
Currently, there is no binary for freebsd
Detected that you have 1 CPU core(s)
Number of CPU core(s) less than or equal to 2, running in single-threaded mode
Local cache found: $NVM_DIR/.cache/src/node-v8.1.0/node-v8.1.0.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/src/node-v8.1.0/node-v8.1.0.tar.xz
$>./configure --prefix=/root/.nvm/versions/node/v8.1.0 <
creating ./icu_config.gypi
* Using ICU in deps/icu-small
creating ./icu_config.gypi
{ 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [],
                       'libraries': []},

...

Now using node v8.1.0 (npm v5.0.3)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions