Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在Centos 6.5+iojs 2.2.1 环境下npm install pinyin出现错误,还请帮助看看 #40

Closed
jimtang9527 opened this issue Jun 8, 2015 · 5 comments

Comments

@jimtang9527
Copy link

 [root@pan miniyunjs]# npm install pinyin 
npm WARN engine nodejieba@0.2.13: wanted: {"node":"0.10.x"} (current: > {"node":"2.2.1","npm":"2.11.0"})
 |
nodejieba@0.2.13 install /home/data/miniyunjs/node_modules/pinyin/node_modules/nodejieba
node-gyp rebuild

make: Entering directory `/home/data/miniyunjs/node_modules/pinyin/node_modules/nodejieba/build'
  CXX(target) Release/obj.target/segment/src/segment.o
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_algobase.h:66,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/char_traits.h:41,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/string:42,
                 from ../node_modules/nan/nan.h:37,
                 from ../src/utils.h:6,
                 from ../src/mix_segment.h:4,
                 from ../src/segment.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_pair.h: In constructor ‘std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = size_t&, _U2 = long int, _T1 = long unsigned int, _T2 = const CppJieba::DictUnit*]’:
../src/CppJieba/Trie.hpp:101:   instantiated from here
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_pair.h:90: 错误:从类型‘long int’到类型‘const CppJieba::DictUnit*’的转换无效
make: *** [Release/obj.target/segment/src/segment.o] 错误 1
make: Leaving directory `/home/data/miniyunjs/node_modules/pinyin/node_modules/nodejieba/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/data/iojs-v2.2.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:199:12)
gyp ERR! System Linux 2.6.32-504.16.2.el6.x86_64
gyp ERR! command "/home/data/iojs-v2.2.1-linux-x64/bin/iojs" "/home/data/iojs-v2.2.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/data/miniyunjs/node_modules/pinyin/node_modules/nodejieba
gyp ERR! node -v v2.2.1
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok 
npm ERR! Linux 2.6.32-504.16.2.el6.x86_64
npm ERR! argv "/home/data/iojs-v2.2.1-linux-x64/bin/iojs" "/usr/local/bin/npm" "install" "pinyin"
npm ERR! node v2.2.1
npm ERR! npm  v2.11.0
npm ERR! code ELIFECYCLE

npm ERR! nodejieba@0.2.13 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the nodejieba@0.2.13 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the nodejieba 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 nodejieba
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/data/miniyunjs/npm-debug.log
@hotoo
Copy link
Owner

hotoo commented Jun 8, 2015

npm i pinyin@2.4.3

@jimtang9527
Copy link
Author

问题依旧啊,错误来自CPP里面的问题

[root@pan miniyunjs]# npm install pinyin@2.4.3
npm WARN engine nodejieba@0.2.13: wanted: {"node":"0.10.x"} (current: {"node":"2.2.1","npm":"2.11.0"})
/
> nodejieba@0.2.13 install /home/data/miniyunjs/node_modules/pinyin/node_modules/nodejieba
> node-gyp rebuild

make: Entering directory `/home/data/miniyunjs/node_modules/pinyin/node_modules/nodejieba/build'
  CXX(target) Release/obj.target/segment/src/segment.o
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_algobase.h:66,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/char_traits.h:41,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/string:42,
                 from ../node_modules/nan/nan.h:37,
                 from ../src/utils.h:6,
                 from ../src/mix_segment.h:4,
                 from ../src/segment.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_pair.h: In constructor ‘std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = size_t&, _U2 = long int, _T1 = long unsigned int, _T2 = const CppJieba::DictUnit*]’:
../src/CppJieba/Trie.hpp:101:   instantiated from here
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_pair.h:90: 错误:从类型‘long int’到类型‘const CppJieba::DictUnit*’的转换无效
make: *** [Release/obj.target/segment/src/segment.o] 错误 1
make: Leaving directory `/home/data/miniyunjs/node_modules/pinyin/node_modules/nodejieba/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/data/iojs-v2.2.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:199:12)
gyp ERR! System Linux 2.6.32-504.16.2.el6.x86_64
gyp ERR! command "/home/data/iojs-v2.2.1-linux-x64/bin/iojs" "/home/data/iojs-v2.2.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/data/miniyunjs/node_modules/pinyin/node_modules/nodejieba
gyp ERR! node -v v2.2.1
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok 
npm ERR! Linux 2.6.32-504.16.2.el6.x86_64
npm ERR! argv "/home/data/iojs-v2.2.1-linux-x64/bin/iojs" "/usr/local/bin/npm" "install" "pinyin@2.4.3"
npm ERR! node v2.2.1
npm ERR! npm  v2.11.0
npm ERR! code ELIFECYCLE

npm ERR! nodejieba@0.2.13 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the nodejieba@0.2.13 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the nodejieba 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 nodejieba
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/data/miniyunjs/npm-debug.log

@hotoo
Copy link
Owner

hotoo commented Jun 8, 2015

rm -rf node_modules/pinyin 试试

@hotoo
Copy link
Owner

hotoo commented Jun 8, 2015

pinyin@2.4.4

@jimtang9527
Copy link
Author

已经解决,谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants