Hi,
I’m trying to install Ghost latest version according to How to install & setup Ghost on Ubuntu 20.04 or 22.04
I have:
Ubuntu 18.04.1 LTS
nginx/1.14.0 (Ubuntu)
Node.js v8.12.0
mysql Ver 14.14 Distrib 5.7.24
I created myuser, added him to sudo group and switched to myuser
Installed node.js, nginx, mysql then did:
$ sudo npm install ghost-cli@latest -g
npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead
/usr/bin/ghost → /usr/lib/node_modules/ghost-cli/bin/ghost
- ghost-cli@1.9.7
updated 1 package in 13.7s$ npm root -g
/usr/lib/node_modules$ ghost
Command ‘ghost’ not found, did you mean:
…$ sudo ls -ld /usr/lib/node_modules/ghost-cli/
drwxr-x— 6 root root 4096 Nov 1 14:56 /usr/lib/node_modules/ghost-cli/
If I do:
$ sudo chown myuser: /usr/lib/node_modules/ghost-cli
I get:
$ ghost
module.js:550
throw err;
^Error: Cannot find module ‘yargs’
When I check npm modules:
$ npm ls -g
/usr/lib
├─┬ ghost-cli@1.9.7
│ ├── UNMET DEPENDENCY abbrev@1.1.1
│ ├── UNMET DEPENDENCY adm-zip@0.4.11
│ ├── UNMET DEPENDENCY bluebird@3.5.1
│ ├── UNMET DEPENDENCY chalk@2.4.1
│ ├── UNMET DEPENDENCY cli-table3@0.5.0
│ ├── UNMET DEPENDENCY debug@3.1.0
│ ├── UNMET DEPENDENCY decompress@4.2.0
│ ├── UNMET DEPENDENCY download@7.1.0
│ ├── UNMET DEPENDENCY execa@0.10.0
│ ├── UNMET DEPENDENCY find-plugins@1.1.7
│ ├── UNMET DEPENDENCY fkill@5.3.0
│ ├── UNMET DEPENDENCY fs-extra@7.0.0
│ ├── UNMET DEPENDENCY generate-password@1.4.0
│ ├── UNMET DEPENDENCY global-modules@1.0.0
│ ├── UNMET DEPENDENCY got@8.3.2
│ ├── UNMET DEPENDENCY inquirer@6.1.0
…npm ERR! missing: semver@5.5.0, required by ghost-cli@1.9.7
npm ERR! missing: shasum@1.0.2, required by ghost-cli@1.9.7
npm ERR! missing: stat-mode@0.2.2, required by ghost-cli@1.9.7
npm ERR! missing: strip-ansi@4.0.0, required by ghost-cli@1.9.7
npm ERR! missing: symlink-or-copy@1.2.0, required by ghost-cli@1.9.7
npm ERR! missing: systeminformation@3.42.9, required by ghost-cli@1.9.7
npm ERR! missing: tail@1.3.0, required by ghost-cli@1.9.7
npm ERR! missing: validator@7.2.0, required by ghost-cli@1.9.7
npm ERR! missing: yargs@12.0.1, required by ghost-cli@1.9.7
npm ERR! missing: yarn@1.9.4, required by ghost-cli@1.9.7
Can you help me out with the installation?