gpt4 book ai didi

ios - React Native pod 安装失败

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:36:25 26 4
gpt4 key购买 nike

我尝试通过 pod 安装 React Native,以便在现有项目中使用它。但是,我在 pod 安装期间遇到错误,这表明 contextify 包存在问题。另一方面,我注意到我只能在 sudo 模式下通过 npm 安装该软件包。但是,Pod 不会在该模式下运行。有什么我可以做的吗?这是我得到的错误的详细描述:

  CXX(target) Release/obj.target/contextify/src/contextify.o

SOLINK_MODULE(target) Release/contextify.node
ld: library not found for -lgcc_s.10.5

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make: *** [Release/contextify.node] Error 1

gyp ERR! build error

gyp ERR! stack Error: `make` failed with exit code: 2

gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)

gyp ERR! stack at ChildProcess.emit (events.js:98:17)

gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)

gyp ERR! System Darwin 14.3.0

gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

gyp ERR! cwd /Users/marcin/Desktop/soap2/ios-client/Pods/React/node_modules/jest-cli/node_modules/jsdom/node_modules/contextify

gyp ERR! node -v v0.10.32

gyp ERR! node-gyp -v v1.0.3

gyp ERR! not ok

npm WARN prefer global eslint@0.9.2 should be installed with -g

npm ERR! Darwin 14.3.0

npm ERR! argv "node" "/usr/local/bin/npm" "install"

npm ERR! node v0.10.32

npm ERR! npm v2.9.0

npm ERR! code ELIFECYCLE



npm ERR! contextify@0.1.13 install: `node-gyp rebuild`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the contextify@0.1.13 install script 'node-gyp rebuild'.

npm ERR! This is most likely a problem with the contextify package,

npm ERR! not with npm itself.

npm ERR! Tell the author that this fails on your system:

npm ERR! node-gyp rebuild

npm ERR! You can get their info via:

npm ERR! npm owner ls contextify

npm ERR! There is likely additional logging output above.

最佳答案

问题是,React 包将尝试安装 npm,但它没有适当的权限。尝试在项目文件夹的/Pods/React 目录中运行“sudo npm install”。使用上述命令手动安装 npm 可能会解决此问题问题。

关于ios - React Native pod 安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30099211/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com