2 shijianduan1 shijianduan1 于 2016.03.02 20:14 提问

ubuntu下安装 hexo失败

执行 sudo npm install hexo -g时 报错

贴上报错

 npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian


> dtrace-provider@0.6.0 install /usr/local/lib/node_modules/hexo/node_modules/hexo-log/node_modules/bunyan/node_modules/dtrace-provider
> node scripts/install.js

sh: 1: node: not found
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm WARN optional dep failed, continuing dtrace-provider@0.6.0
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/cssstyle/lib/properties'
npm ERR! error rolling back  hexo@3.2.0 { [Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/cssstyle/lib/properties']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: '/usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/cssstyle/lib/properties' }
npm ERR! spawn-sync@1.0.15 postinstall: `node postinstall`
npm ERR! Exit status 127
npm ERR! 
npm ERR! Failed at the spawn-sync@1.0.15 postinstall script.
npm ERR! This is most likely a problem with the spawn-sync package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node postinstall
npm ERR! You can get their info via:
npm ERR!     npm owner ls spawn-sync
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.19.0-51-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "hexo" "-g"
npm ERR! cwd /home/sjd/code
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR! Error: ENOENT, open '/usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/request/node_modules/hawk/lib/server.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 3.19.0-51-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "hexo" "-g"
npm ERR! cwd /home/sjd/code
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/request/node_modules/hawk/lib/server.js
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! EEXIST, mkdir '/usr/local/lib/node_modules/hexo/node_modules/warehouse/node_modules/cuid/node_modules/core-js/library/fn/symbol'
File exists: /usr/local/lib/node_modules/hexo/node_modules/warehouse/node_modules/cuid/node_modules/core-js/library/fn/symbol
Move it away, and try again. 

npm ERR! System Linux 3.19.0-51-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "hexo" "-g"
npm ERR! cwd /home/sjd/code
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/lib/node_modules/hexo/node_modules/warehouse/node_modules/cuid/node_modules/core-js/library/fn/symbol
npm ERR! fstream_path /usr/local/lib/node_modules/hexo/node_modules/warehouse/node_modules/cuid/node_modules/core-js/library/fn/symbol/iterator.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code EEXIST
npm ERR! errno 47
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:171:23
npm ERR! fstream_stack /usr/lib/nodejs/mkdirp/index.js:46:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/request/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/LICENSE'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 3.19.0-51-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "hexo" "-g"
npm ERR! cwd /home/sjd/code
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/request/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/LICENSE
npm ERR! fstream_path /usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/request/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/LICENSE
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (evalmachine.<anonymous>:107:15)
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 3.19.0-51-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "hexo" "-g"
npm ERR! cwd /home/sjd/code
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js
npm ERR! fstream_path /usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (evalmachine.<anonymous>:107:15)
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/stream.markdown'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

1个回答

caozhy
caozhy   Ds   Rxr 2016.03.07 05:38
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
Ubuntu下用Hexo搭建个人博客及常见问题的解决方案
说到Hexo搭建个人博客,网上有很多写好的博文,给大家推荐几个。 Ubuntu+hexo+github搭建个人博客环境及hexo配置(写的很详细) Hexo在github上构建免费的Web应用 首先,登录github,然后创建一个新的仓库(repository),这里Github给出了。如下 仓库建好之后,我们开始在Ubuntu14.04上安装Git环境。 终端输入: sudo a
ubuntu下hexo博客搭建
nodejs 安装apt方式安装 sudo apt-get install npm 解压安装 nodejs5.7 百度云地址 将下载的nodejs移动到/usr/local目录下 sudo tar xzvf node-v5.7.0-linux-x64.tar.gz -C /usr/local 配置环境变量 sudo vim /etc/profile 在文件末尾追加 export
npm安装hexo 报错 错误如下
解决办法如下: 问题解决:(使用下面的命令,问题就解决) sudo npm install –unsafe-perm –verbose -g hexo
ubuntu下使用hexo搭建博客
1.安装Node.jssudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs2.安装Gitsudo apt-get install git3.安装hexo sudo npm install hexo -g初始你博客的根目录(或者cd到指定目录下,然后执行hexo ini
ubuntu16.04 部署 hexo
步骤 安装 node.js [1] # Using Ubuntu curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - sudo apt-get install -y nodejs setup npm [2] curl -L https://www.npmjs.com/install.sh | s...
在 Ubuntu 14.04 服务器上部署 Hexo 博客
版权声明:本文由宋秉金  原创文章,转载请注明出处:  文章原文链接:https://www.qcloud.com/community/article/241080001487926962 来源:腾云阁 https://www.qcloud.com/community   除了闷头专研技术之外,程序员还需要不断地写作进行技术积累,写博客是其中最重要的方式之一。商业博客平台不
Linux环境下使用hexo+github搭建个人博客
前言 相当前天刷知乎,看见别人的blog的是放在github上,最近也刚学会使用github,也想尝试着将自己的blogs放在github上;昨天曾经Google查找资料,尝试着自己搭建但是无奈出现问题,最后一步安装hexo失败了;今天不甘心,又去查阅了hexo的官方文档。终于解决了所有的errors。顺便说一下题外话,有时候发现官方文档真的比什么都有用啊啊啊 首先需要说明的是使用的工具是he
Ubuntu上用Hexo搭建博客托管到github
1. 安装Nodejs 作用:用来生成静态页面的 $ sudo apt-get install nodejs $ sudo apt-get install npm 备用:sudo apt install nodejs-legacy 检查版本:node -v 如果出现"无法获得锁 /var/lib/dpkg/lock - open (11: 资源暂时不可用)" 解决
hexo安装错误err!
一直以来想搭建一个人站点,没有动手,最近一段时间开始着手,网上查看了很多的资料,感觉HEXO是一个很不错的静态博客框架,就选择了使用HEXO。hexo是一款基于Node.js的静态博客框架。        我用的是Mac电脑,在安装HEXO踩到坑了。 找个种办法: 网上看了别人成功的方法: 第一种:修改权限,chmod 777 /var/root 修改权限 第二种:sudo npm
安装Hexo时npm install hexo -g 出错
错误如下: 解决方式: it was caused by the ByteFence Anti-malware software. After we uninstalled it, npm works. 重新安装: