在Windows 10上的ubunutu上的bash上安装nvm会引发错误

时间:2016-04-11 10:28:54

标签: linux node.js windows ubuntu nvm

我在Windows 10上测试ubuntu上的新bash,我尝试做的第一件事就是安装节点。当然,因为我现在有一个“Linux系统”,所以我继续安装了nvm。

我也必须

apt-get make gcc g++

我做过一次尝试

nvm install v4.4.2

但我得到了:

make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/root/.nvm/src/node-v4.4.2/out'
g++ -pthread -rdynamic -m64 -fuse-ld=gold -B/root/.nvm/src/node-
v4.4.2/third_party/binutils/Linux_x64/Release/bin -m64  -o /root/.nvm/src/node-v4.4.2/out/Release/mksnapshot -Wl,--start-group /root/.nvm/src/node-v4.4.2/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/mksnapshot.o /root/.nvm/src/node-v4.4.2/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a /root/.nvm/src/node-v4.4.2/out/Release/obj.target/deps/v8/tools/gyp/libv8_nosnapshot.a /root/.nvm/src/node-v4.4.2/out/Release/obj.target/deps/v8/tools/gyp/libv8_libplatform.a /root/.nvm/src/node-v4.4.2/out/Release/obj.target/deps/v8/tools/gyp/libv8_libbase.a -Wl,--end-group -ldl -lrt
/usr/bin/ld.gold: fatal error: /root/.nvm/src/node-v4.4.2/out/Release/mksnapshot: Invalid argument
collect2: error: ld returned 1 exit status
make[1]: *** [/root/.nvm/src/node-v4.4.2/out/Release/mksnapshot] Error 1
make[1]: Leaving directory `/root/.nvm/src/node-v4.4.2/out'
make: *** [node] Error 2
nvm: install v4.4.2 failed!

你知道是什么导致了这个吗?我想我可能在make命令上有一些错误的配置?

注意:使用“官方方式”安装节点有效,即:

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs

1 个答案:

答案 0 :(得分:1)

我认为这是bash子系统中的一个问题。 github.com上有几个与安装private cache: {string: Rx.Observable<any>}; public getSomethings(names: string[]) : Rx.Observable<any> { // call getSomething for each entry in names // streams is an array of observables const streams = names.map(name => this.getSomething(name)); // transform streams into an observable with an array of results return Observable.zip(streams); } public getSomething(name: string) : Rx.Observable<any> { if (!this.cache[name]) { // create the request observable // const request = Rx.Observable.ajax(...); // http://reactivex.io/rxjs/class/es6/Observable.js~Observable.html#static-method-ajax // for now, just wait 2 seconds and return name const request = Rx.Obsevable.of(name).delay(2000); // use "do" to log whenever this raw request produces data const loggedRequest = request.do(v => this.messages.push("retrieved from server " + v)); // create an observable that caches the result // in an asyncSubject const cachedRequest = loggedRequest.publishLast(); // store this in our cache object this.cache[name] = cachedRequest; } // return the cached async subject return this.cache[name]; } // usage this.getSomething("thing1").subscribe(v => this.messages.push("received " + v)); this.getSomething("thing1").subscribe(v => this.messages.push("received " + v)); this.getSomething("thing1").subscribe(v => this.messages.push("received " + v)); this.getSomething("thing1").subscribe(v => this.messages.push("received " + v)); nvmrbenv相关的未解决问题,以及创建符号链接。

这两个问题似乎与您遇到的问题直接相关。 https://github.com/Microsoft/BashOnWindows/issues/6 https://github.com/Microsoft/BashOnWindows/issues/9

另外,仅供参考,我试图从源代码构建节点4和节点5,但在rvm命令期间失败并显示以下消息:

make

相关问题