Submitted by dmutterer on Tue, 01/03/2017 - 13:09
A user of mine wanted to use ghost as their top level site. After figuring out that node.js was missing we tried to install that, but no combination of things work.
Since it would seem that node.js should almost be a global setting, it's not very clear how to install both of these apps to get them to function.
Also, we were surprised that, since it's on your install menu, that it didn't "just work"
So how to we get ghost to run in a domain hosted on my server?
Status:
Active
Comments
Submitted by JamieCameron on Tue, 01/03/2017 - 19:04 Comment #1
Did you try just using the Ghost script installer in Virtualmin? That should setup both Node.js and Ghost for you.
Submitted by dmutterer on Tue, 01/03/2017 - 20:10 Comment #2
Found http://nodejs.org:80/dist/v6.9.0/node-v6.9.0-linux-x64.tar.gz in cache .. Found https://github.com:443/TryGhost/Ghost/releases/download/0.11.3/Ghost-0.1... in cache ..
Now installing Ghost version 0.11.3 .. NPM install of Ghost failed : /usr/bin/env: node: No such file or directory More information on using this script can be found at http://ghost.org/.
.. installation was only partially complete.
Submitted by JamieCameron on Tue, 01/03/2017 - 20:46 Comment #3
Does the file
/usr/bin/env
exist on your system?Submitted by dmutterer on Tue, 01/03/2017 - 23:31 Comment #4
There are multiple issues going on here.
1) This might be a common issue on Debian installations. I've found many references to this.
2) You are installing nodejs local to the users public_html but the installation of ghost itself relies on a public install of "node" in /usr/bin, or you're not setting the proper $PATH before calling the install. A fix to get ghost installed is to install node.js first, then create a symbolic link like "ln -s /home/usersdomain/public_html/nodejs/bin/node /usr/bin/node", then you can run the install of ghost.
3) Even though you have v 0.11.3 available in your install scripts, it has a prerequisite of a newer version of node.js that you do not have as a option, which is why, I'm guessing, that you have v 0.7.1 as the default. Which now means that we have to run an older version of ghost with no current option to upgrade.
Submitted by JamieCameron on Wed, 01/04/2017 - 15:44 Comment #5
I suspect you might be right about the PATH, sort of. Because Virtualmin installs it's own version of
npm
andnode
into the domain's directory, it adds this directory to the PATH ... but at the end. So if you have a local version installed in /usr/bin , it might be run instead.Do you need the Debian package of Node.js on your system? If not, perhaps try un-installing it.
Submitted by jnials on Thu, 03/22/2018 - 23:28 Comment #6
So I'm seeing the same problem, I have not got node installed. I've tried installing it at the top level as well as at ghost_blog. It's definitely not working.
Submitted by JamieCameron on Sat, 03/24/2018 - 14:22 Comment #7
jnials - which Linux distribution and version were you installing on?