当我用ghost-cli安装ghost时,我收到错误

时间:2017-08-15 18:14:51

标签: node.js npm ghost

我有一台带有mysql服务器和nginx的CentOS 7机器。我用yum install nodejs和ghost-cli安装了nodejs。

我想用ghost-cli安装ghost。但是当我进入ghost install commant时,我收到了这个错误:

✖ Checking system Node.js version
A SystemError occurred.

Message: The version of Ghost-CLI you are running was not installed with this version of Node.
This means there are likely two versions of Node running on your system, please ensure
that you are only running one global version of Node before continuing.

Debug Information:
    Node Version: v6.11.1
    Ghost-CLI Version: 1.1.0
    Environment: production
    Command: 'ghost install'

导致此错误的原因是什么?我该如何解决?谢谢。

1 个答案:

答案 0 :(得分:1)

  

[Ghost-CLI的核心撰稿人Austin编辑后回复   问题]

我问奥斯汀,为什么他选择不使用本地的npm版本?

他回答:

原因是ghost创建了一个特定的ghost用户来运行ghost。如果你在本地安装nvm(例如在~/.nvm中),有一个非常真实的(例如已发生过几次)的可能性,创建的ghost用户无法运行ghost,因为主文件夹没有&#39 ; t允许文件系统上每个人的读取权限。

暂时关闭此问题 - 如果有更多人遇到此问题,我们可以重新开启并找出更好的解决方案

好的,看起来你可以通过以root身份运行安装来解决这个问题,但这不是我可以做的事情,所以我深入挖掘了过去几天推送到{{3}的代码我最好的猜测是这个特定的提交Ghost-CLI导致权限问题。

我已经使用Ghost-CLI项目创建了一个fix nvm -- ea30015,看看他们是否也可以确认它。

相关问题