搜尋

首頁  >  問答  >  主體

node.js - mac下源码安装node-4.2.1,提示libtool: unrecognized option `-static'

os:10.10.4
gcc version:
          Apple LLVM version 7.0.0 (clang-700.0.72)
          Target: x86_64-apple-darwin14.4.0
          Thread model: posix
libtool version:libtool (GNU libtool) 2.4.2

编译到一半报了以下的错误

/Applications/Xcode.app/Contents/Developer/usr/bin/make -C out BUILDTYPE=Release V=1
  rm -f /Users/zruibin/Desktop/node-4.2.1/out/Release/libgtest.a && ./gyp-mac-tool filter-libtool libtool  -static -o /Users/zruibin/Desktop/node-4.2.1/out/Release/libgtest.a /Users/zruibin/Desktop/node-4.2.1/out/Release/obj.target/gtest/deps/gtest/src/gtest-death-test.o /Users/zruibin/Desktop/node-4.2.1/out/Release/obj.target/gtest/deps/gtest/src/gtest-filepath.o /Users/zruibin/Desktop/node-4.2.1/out/Release/obj.target/gtest/deps/gtest/src/gtest-port.o /Users/zruibin/Desktop/node-4.2.1/out/Release/obj.target/gtest/deps/gtest/src/gtest-printers.o /Users/zruibin/Desktop/node-4.2.1/out/Release/obj.target/gtest/deps/gtest/src/gtest-test-part.o /Users/zruibin/Desktop/node-4.2.1/out/Release/obj.target/gtest/deps/gtest/src/gtest-typed-test.o /Users/zruibin/Desktop/node-4.2.1/out/Release/obj.target/gtest/deps/gtest/src/gtest.o /Users/zruibin/Desktop/node-4.2.1/out/Release/obj.target/gtest/deps/gtest/src/gtest_main.o
libtool: unrecognized option `-static'
libtool: Try `libtool --help' for more information.
make[1]: *** [/Users/zruibin/Desktop/node-4.2.1/out/Release/libgtest.a] Error 1
make: *** [node] Error 2

libtool我是用homebrew安装的,我重新卸载后用源码再install了一遍,还是遇到了同样的问题
有人遇到过吗?要怎么解决呀?

迷茫迷茫2788 天前690

全部回覆(1)我來回復

  • PHP中文网

    PHP中文网2017-04-17 12:59:48

    只有 mac 自帶的 libtool 才有 -static 這個參數。你執行brew unlink libtool,再試試

    回覆
    0
  • 取消回覆