New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 14.04 installation problem with Ghost 0.5 #3883

Closed
aminjam opened this Issue Aug 26, 2014 · 8 comments

Comments

Projects
None yet
6 participants
@aminjam
Copy link

aminjam commented Aug 26, 2014

Ghost is not installing properly for Ubuntu 14.04. I can't start the node server after npm install --production. Is there a solution for this?
screen shot 2014-08-26 at 9 21 38 am

@novaugust

This comment has been minimized.

Copy link
Member

novaugust commented Aug 26, 2014

Looks like you're trying to run production off of the latest version of master, which isn't something we recommend!

You need to do a full npm install, not just npm install --production, I think.

@ErisDS

This comment has been minimized.

Copy link
Member

ErisDS commented Aug 26, 2014

Hi @aminjam welcome to Ghost.

As @novaugust pointed out, we really do not recommend installing from master unless you're intending to contribute to core, there is a stable branch if you want to install from Git, but you will need to follow the developer install instructions. It looks to me like your npm intall --production did not complete successfully. I also recommend installing node and npm such that using sudo is not necessary, otherwise you are likely to run into problems.

I'm closing this as we use our GitHub is for tracking active issues with the Ghost software. For more information about raising issues on GitHub please see our contributing guidelines. The best place to get support with installation and environment issues is our forum.

@ErisDS ErisDS closed this Aug 26, 2014

@aminjam

This comment has been minimized.

Copy link

aminjam commented Aug 26, 2014

This is a problem in the ghost 0.5 release. I just checked out the master to verify the problem.

I just created a brand new Ubuntu 14.04 with node (v0.10.31) and npm (v1.4.23), and can't get ghost started. Here are steps to produce it:

http://support.ghost.org/installing-ghost-linux/

  1. curl -L https://ghost.org/zip/ghost-latest.zip -o ghost.zip
  2. unzip -uo ghost.zip -d ghost
  3. cd ghost
  4. npm install --production
  5. node index.js
ERROR: Cannot find module '/home/vagrant/ghost/node_modules/sqlite3/lib/binding/node-v11-linux-x64/node_sqlite3.node' Error: Cannot find module '/home/vagrant/ghost/node_modules/sqlite3/lib/binding/node-v11-linux-x64/node_sqlite3.node' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/home/vagrant/ghost/node_modules/sqlite3/lib/sqlite3.js:5:15) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17)
@jaswilli

This comment has been minimized.

Copy link
Member

jaswilli commented Aug 26, 2014

Hi @aminjam,

That's not a problem with Ghost, it's a problem with your environment. Either the sqlite3 shared library cannot be found/built on your server for some reason, or you still have a lingering issue from your previous attempt.

I suggest that you rm -rf node_modules && npm cache clean and then try npm install --production again (as a non-root user).

If Ghost still does not start and shows a module error you'll need to cross reference the module it's complaining about with the output from npm install --production and see what went wrong. If it's sqlite3 again, make sure you have sqlite3 installed on your server.

@aminjam

This comment has been minimized.

Copy link

aminjam commented Sep 8, 2014

Thanks, my problems ended up being lack of ram. I was getting random errors since I was running out of ram. It's all working now.

@OscarSwanros

This comment has been minimized.

Copy link

OscarSwanros commented Apr 15, 2015

Hi all.

When I try to run the process from my upstart script, it stops seconds after it starts, and the logs on /var/log/upstart/blog.log are:

> ghost@0.6.0 start /var/www/swanros.com/ghost
> node index

^[[31m
ERROR:^[[39m ^[[31mCannot find module '/var/www/swanros.com/ghost/node_modules/sqlite3/lib/binding/node-v14-linux-x64/node_sqlite3.node'^[[39m

 Error: Cannot find module '/var/www/swanros.com/ghost/node_modules/sqlite3/lib/binding/node-v14-linux-x64/node_sqlite3.node'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/var/www/swanros.com/ghost/node_modules/sqlite3/lib/sqlite3.js:4:15)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)

However, if I go to /var/www/swanros.com/ghost and run npm start --production everything works correctly.

Any ideas on this?

@ErisDS

This comment has been minimized.

Copy link
Member

ErisDS commented Apr 15, 2015

@OscarSwanros I recommend trying either the forum or slack for getting help with issues like these.

@AntuanKhanna

This comment has been minimized.

Copy link
Contributor

AntuanKhanna commented Aug 31, 2015

This error also occurs when you are trying to run a Ghost (ex. 0.5) with unsupported version of Node (ex. 0.12).

Supported version of Node for specific Ghost version can be found in package.json under engines section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment