2017-08-15 102 views
2

我有一台CentOS 7机器,使用mysql服务器和nginx。我用yum install nodejs和ghost-cli安装了nodejs。当我使用ghost-cli安装ghost时,我收到错误

我想安装ghost-cli的ghost。但是当我进入鬼安装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' 

什么造成这个错误,我该如何解决呢?谢谢。

+0

你有多个版本的节点安装? – leninhasda

+0

没有。只有一个版本 – Ahmad

+0

我刚开始在一台trusty64机器上仅仅10分钟就遇到了同样的问题。就我而言,只有当我使用Ansible playbook进行安装时才会发生这种情况。 我已经通过nvm安装了节点v6.11.2,并且可以看到使用相同的节点版本(在'.nvm/versions/node/v6.11.2/bin'内)安装了ghost以及npm和节点(所有3个都符号链接到'/usr/local/bin')并运行'哪个节点(或npm或ghost)显示正确的路径 – mohitsharma44

回答

1

[Edited after Austin, the core contributor of Ghost-CLI, responded to the issue]

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

他回答:

的原因是鬼创建一个用以运行ghost特定幻影用户。如果您在本地安装nvm(例如,在~/.nvm),则存在非常真实(例如发生多次)的可能性,即创建的ghost用户将无法运行ghost,因为主文件夹不允许读取每个人的权限文件系统。

要关闭这个问题,现在 - 如果有更多的人有问题,这个我们就可以重新开放,并找出一个更好的解决方案


好,所以看起来你能够通过运行安装来解决作为根,但这不是我可以做的事情,所以我深入了解了在过去几天里推到Ghost-CLI的代码,我最好的猜测是这个具体的提交fix nvm -- ea30015导致了权限问题。

我使用Ghost-CLI项目创建了issue #447以查看它们是否可以确认。

+0

在我的情况下,问题不是nvm。虽然我实际上决定更换机器到Ubuntu 16.0.4 LTS,并在该机器上适用于我。 – Ahmad

相关问题