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

Linux 2.6.32-358.el6.x86_64 npm安装失败 #30

Open
MrBackKom opened this issue Jul 8, 2015 · 10 comments
Open

Linux 2.6.32-358.el6.x86_64 npm安装失败 #30

MrBackKom opened this issue Jul 8, 2015 · 10 comments

Comments

@MrBackKom
Copy link

如题在Linux 环境上安装失败
我先贴个log在上面,看看你能不能帮忙看下,我初步看是出错在 fis-sass的build.js文件中 .
看看能不能帮忙看看

sudo npm install -g fis-parser-sass
fis-sass@3.1.3 install /usr/lib/node_modules/fis-parser-sass/node_modules/fis-sass
node build.js
Downloading http://fisstatic.duapp.com/addons/fis-sass/3.1.0/linux-x64/0.12.0/binding.node ...
Received 513K...
Received 1052K...
Received 1564K...
Received 1753K total.
Test failed!
child_process: customFds option is deprecated, use stdio instead.
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.12.2"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/fis-parser-sass/node_modules/fis-sass/.node-gyp"
make: Entering directory /usr/lib/node_modules/fis-parser-sass/node_modules/fis-sass/build' CXX(target) Release/obj.target/binding/src/binding.o ../src/binding.cpp: In function ‘Sass_Import** sass_importer2(const char*, const char*, void*)’: ../src/binding.cpp:27: 警告:实参为 NULL,需要非 NULL 值(实参 1) ../src/binding.cpp:28: 警告:实参为 NULL,需要非 NULL 值(实参 1) ../src/binding.cpp: In function ‘void GetStats(v8::Handle<v8::Object>, Sass_Context*)’: ../src/binding.cpp:95: 错误:‘nullptr’在此作用域中尚未声明 make: *** [Release/obj.target/binding/src/binding.o] 错误 1 make: Leaving directory/usr/lib/node_modules/fis-parser-sass/node_modules/fis-sass/build'
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:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 2.6.32-358.el6.x86_64
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/fis-parser-sass/node_modules/fis-sass
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
Build failed
npm ERR! Linux 2.6.32-358.el6.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "fis-parser-sass"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! code ELIFECYCLE

npm ERR! fis-sass@3.1.3 install: node build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fis-sass@3.1.3 install script 'node build.js'.
npm ERR! This is most likely a problem with the fis-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls fis-sass
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/rong/www/trunk/npm-debug.log

@nimoc
Copy link

nimoc commented Jul 22, 2015

[root@reserve ~]# npm install fis-parser-sass -g
/
> fis-sass@3.1.3 install /usr/local/nodejs/lib/node_modules/fis-parser-sass/node_modules/fis-sass
> node build.js

Downloading http://fisstatic.duapp.com/addons/fis-sass/3.1.0/linux-x64/0.12.0/binding.node ...
Received 540K...
Received 1106K...
child_process: customFds option is deprecated, use stdio instead.
Received 1240K total.
fis-parser-sass@0.3.9 /usr/local/nodejs/lib/node_modules/fis-parser-sass
└── fis-sass@3.1.3 (step@0.0.5, nan@1.8.4, chalk@0.5.1)
[root@reserve ~]# gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: EPERM, utime '/root/.node-gyp/0.12.5'
gyp ERR! stack     at Error (native)
gyp ERR! System Linux 2.6.32-504.23.4.el6.x86_64
gyp ERR! command "node" "/usr/local/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/nodejs/lib/node_modules/fis-parser-sass/node_modules/fis-sass
gyp ERR! node -v v0.12.5
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok 

我也是

@coooold
Copy link

coooold commented Jul 29, 2015

libsass要求gcc 4.6+,得先升级系统。。。

@MrBackKom
Copy link
Author

@coooold @BaiduFE 升级到GCC 4.8 之后依然安装不上......

➜ ~ sudo npm install -g fis-parser-sass
|

fis-sass@3.1.3 install /usr/lib/node_modules/fis-parser-sass/node_modules/fis-sass
node build.js

Downloading http://fisstatic.duapp.com/addons/fis-sass/3.1.0/linux-x64/0.12.0/binding.node ...
Received 513K...
Received 1026K...
Received 1591K...
Received 1753K total.
Test failed!
child_process: customFds option is deprecated, use stdio instead.
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.12.2"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/fis-parser-sass/node_modules/fis-sass/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: connect ETIMEDOUT
gyp ERR! stack at exports._errnoException (util.js:746:11)
gyp ERR! stack at TCPConnectWrap.afterConnect as oncomplete
gyp ERR! System Linux 2.6.32-358.el6.x86_64
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/fis-parser-sass/node_modules/fis-sass
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
Build failed
npm ERR! Linux 2.6.32-358.el6.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "fis-parser-sass"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! code ELIFECYCLE

npm ERR! fis-sass@3.1.3 install: node build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fis-sass@3.1.3 install script 'node build.js'.
npm ERR! This is most likely a problem with the fis-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls fis-sass
npm ERR! There is likely additional logging output above.

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

@oxUnd
Copy link

oxUnd commented Jul 30, 2015

不用用 sudo 调用 npm,会出现一些问题。

@MrBackKom
Copy link
Author

@xiangshouding @coooold

不用sudo 也是有问题的

Downloading http://fisstatic.duapp.com/addons/fis-sass/3.1.0/linux-x64/0.12.0/binding.node ...
Received 513K...
Received 1026K...
Received 1545K...
Received 1753K total.
Test failed!
child_process: customFds option is deprecated, use stdio instead.
make: Entering directory /usr/local/lib/node_modules/fis-parser-sass/node_modules/fis-sass/build' CXX(target) Release/obj.target/binding/src/binding.o ../src/binding.cpp: 在函数‘Sass_Import** sass_importer2(const char*, const char*, void*)’中: ../src/binding.cpp:27:50: 警告:实参为 NULL,需要非 NULL 值(实参 1) [-Wnonnull] NanNew<String>(strdup(file ? strdup(file) : 0)), ^ ../src/binding.cpp:28:50: 警告:实参为 NULL,需要非 NULL 值(实参 1) [-Wnonnull] NanNew<String>(strdup(prev ? strdup(prev) : 0)), ^ CXX(target) Release/obj.target/binding/src/sass_context_wrapper.o CXX(target) Release/obj.target/binding/src/libsass/ast.o CXX(target) Release/obj.target/binding/src/libsass/base64vlq.o CXX(target) Release/obj.target/binding/src/libsass/bind.o CC(target) Release/obj.target/binding/src/libsass/cencode.o CXX(target) Release/obj.target/binding/src/libsass/constants.o CXX(target) Release/obj.target/binding/src/libsass/context.o CXX(target) Release/obj.target/binding/src/libsass/contextualize.o CXX(target) Release/obj.target/binding/src/libsass/copy_c_str.o CXX(target) Release/obj.target/binding/src/libsass/error_handling.o CXX(target) Release/obj.target/binding/src/libsass/eval.o CXX(target) Release/obj.target/binding/src/libsass/expand.o CXX(target) Release/obj.target/binding/src/libsass/extend.o CXX(target) Release/obj.target/binding/src/libsass/file.o CXX(target) Release/obj.target/binding/src/libsass/functions.o CXX(target) Release/obj.target/binding/src/libsass/inspect.o CXX(target) Release/obj.target/binding/src/libsass/json.o ../src/libsass/json.cpp: 在函数‘bool parse_string(const char**, char**)’中: ../src/libsass/json.cpp:110:51: 警告:此函数中的‘sb.SB::start’在使用前可能未初始化 [-Wmaybe-uninitialized] sb->start = (char*) realloc(sb->start, alloc + 1); ^ ../src/libsass/json.cpp:826:6: 附注:‘sb.SB::start’在此声明 SB sb; ^ ../src/libsass/json.cpp:97:19: 警告:此函数中的‘sb.SB::end’在使用前可能未初始化 [-Wmaybe-uninitialized] if ((sb)->end - (sb)->cur < (need)) \ ^ ../src/libsass/json.cpp:826:6: 附注:‘sb.SB::end’在此声明 SB sb; ^ ../src/libsass/json.cpp:138:85: 警告:此函数中的‘sb.SB::cur’在使用前可能未初始化 [-Wmaybe-uninitialized] assert(sb->start <= sb->cur && strlen(sb->start) == (size_t)(sb->cur - sb->start)); ^ ../src/libsass/json.cpp:826:6: 附注:‘sb.SB::cur’在此声明 SB sb; ^ CXX(target) Release/obj.target/binding/src/libsass/node.o CXX(target) Release/obj.target/binding/src/libsass/output_compressed.o CXX(target) Release/obj.target/binding/src/libsass/output_nested.o CXX(target) Release/obj.target/binding/src/libsass/parser.o CXX(target) Release/obj.target/binding/src/libsass/prelexer.o CXX(target) Release/obj.target/binding/src/libsass/remove_placeholders.o CXX(target) Release/obj.target/binding/src/libsass/sass.o CXX(target) Release/obj.target/binding/src/libsass/sass2scss.o CXX(target) Release/obj.target/binding/src/libsass/sass_context.o CXX(target) Release/obj.target/binding/src/libsass/sass_functions.o 1 CXX(target) Release/obj.target/binding/src/libsass/sass_interface.o CXX(target) Release/obj.target/binding/src/libsass/sass_util.o CXX(target) Release/obj.target/binding/src/libsass/sass_values.o CXX(target) Release/obj.target/binding/src/libsass/source_map.o CXX(target) Release/obj.target/binding/src/libsass/to_c.o CXX(target) Release/obj.target/binding/src/libsass/to_string.o CXX(target) Release/obj.target/binding/src/libsass/units.o CXX(target) Release/obj.target/binding/src/libsass/utf8_string.o CXX(target) Release/obj.target/binding/src/libsass/util.o SOLINK_MODULE(target) Release/obj.target/binding.node SOLINK_MODULE(target) Release/obj.target/binding.node: Finished COPY Release/binding.node make: Leaving directory/usr/local/lib/node_modules/fis-parser-sass/node_modules/fis-sass/build'
Test failed!
npm ERR! Linux 2.6.32-358.el6.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "fis-parser-sass"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! code ELIFECYCLE

npm ERR! fis-sass@3.1.3 install: node build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fis-sass@3.1.3 install script 'node build.js'.
npm ERR! This is most likely a problem with the fis-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls fis-sass
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/rong/www/trunk/npm-debug.log

@aCodeBaby
Copy link

Downloading http://fisstatic.duapp.com/addons/fis-sass/3.1.0/linux-x64/0.12.0/binding.node ...
Received 513K...
Received 1026K...
Received 1545K...
Received 1753K total.
Test failed!
child_process: customFds option is deprecated, use stdio instead.
我也报同样的错误,不过是卡在这里不动了,试了几次都是这样,npm的版本是2.11.2 然后node版本是0.12.0不知道跟这些有没有关系,需要试试
已更新到最新测试,还是一样,卡在上面的地方不动了~~~

@oxUnd
Copy link

oxUnd commented Aug 7, 2015

https://github.com/xiangshouding/fis-parser-sass-by-ruby

我实现了一个调用外部命令处理 sass 文件的插件,不过提前得安装好依赖,应该不会出现安装不上的问题,大家实在没办法可以试试。

@nimoc
Copy link

nimoc commented Aug 19, 2015

可以试试这个 https://www.npmjs.com/package/fis-parser-sass2

亲测有效(但还是有些小坑)

Linux version 2.6.32-504.23.4.el6.x86_64 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) ) #1 SMP Tue Jun 9 20:57:37 UTC 2015

node -v
v0.12.5
npm -v
2.11.2
fis3 -v 
 v3.1.0

@nimoc
Copy link

nimoc commented Aug 31, 2015

fis-parser-sass2 还是有些小坑,开启 watch + md5 时会出现 map.json 中找不到对应的 sass 。

能用 fis-parser-sass 还是用 fis-parse-sass

@2betop
Copy link
Contributor

2betop commented Aug 31, 2015

@nimojs fis-parser-sass 之所以基于 fis-sass 是因为当时编译机上安装不上,所以自己包装了下 lib-sass 库,我觉得 fis-parser-sass2 我觉得只要处理好两个事情应该就能用了:

  1. 保存缓存依赖。比如 b.scss @import 了 a.scss, 需要把 b 的 cache 对象里面标记依赖 a. 标记后, watch 的时候, a 文件变化,会触发 b 文件重新编译。
  2. 路径问题,比如 a.scss 文件里面引用了某个图片,但是是相对与 a.scss 文件,如果其他目录下面的 scss 文件 @import 了 a.scss, 路径应该没有修改过来。

关于以上两个功能,可以参考 fis-parser-sass

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

6 participants