hexo安装报错问题

根据hexo官方文档,安装hexo之前要安装nodejs、npm、git等。之后用npm install -g hexo-cli来安装hexo。

但会报错,提示文件权限问题。

解决方法是使用npm安装hexo时还要sudo apt-get install nodejs-legacy,这是ubuntu特有的问题,原因如下

Essentially this allow you to call the node binary file using the command node instead of nodejs. Debian based systems (like Ubuntu) have changed the name because it conflicts with an old Ham Packet radio package called node.

If you install nodejs manually from the nodejs.org website, you wont have this issue.

这种方式安装后还是有警告:
npm WARN optional Skipping failed optional dependency /hexo-cli/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]

按照hexo官方文档手动安装nodejs,无报错

http://kerwinzhao.github.io/

你可能感兴趣的:(tools)