Ich habe Schwierigkeiten bei der Installation des HyperLiedger Composer lokal auf einem Ubuntu-System gemäß https://hyperledger.github.io/composer/installing/development-tools.html. Ich glaube, ich habe alle Anforderungen erfüllen:EACCES während der Installation von HyperLEDGER Composer
[email protected]:~/hyperledger-composer$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.2 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.2 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
[email protected]:~/hyperledger-composer$ docker --version
Docker version 17.03.1-ce, build c6d412e
[email protected]:~/hyperledger-composer$ docker-compose --version
docker-compose version 1.13.0, build 1719ceb
[email protected]:~/hyperledger-composer$ node --version
v6.10.3
[email protected]:~/hyperledger-composer$ npm --version
3.10.10
[email protected]:~/hyperledger-composer$ git --version
git version 2.7.4
[email protected]:~/hyperledger-composer$ python --version
Python 2.7.12
[email protected]:~/hyperledger-composer$ code --version
1.15.1
41abd21afdf7424c89319ee7cb0445cc6f376959
[email protected]:~/hyperledger-composer$
Zugegeben, nicht die Anweisungen sagen, ich brauche git 2.9.x
oder höher und ich habe nur git 2.7.4
aber ich bin nicht sicher, dass ein Problem oder das spezifische Problem verursachen würde ich Ich sehe. Wenn ich versuche, Komponist-cli zu installieren, erhalte ich:
[email protected]:~/hyperledger-composer$ npm install -g composer-cli
npm WARN deprecated [email protected]: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated [email protected]: Use uuid module instead
npm WARN deprecated [email protected]: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated [email protected]: Deprecated, use jstransformer
npm WARN deprecated [email protected]: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
/usr/lib
+-- [email protected]
+-- [email protected]
.
.
.
+-- [email protected]
+-- [email protected]
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modules/composer-cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 4.4.0-91-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "composer-cli"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! path /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! at Error (native)
npm ERR! { Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! at Error (native)
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/lib/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /home/ibmadmin/hyperledger-composer/npm-debug.log
[email protected]:~/hyperledger-composer$
ich viel von der npm install
Ausgabe entfernt, weil ich nicht glaube, es war relevant, und es war ziemlich lang.
Gemäß den Anweisungen, ich bin nicht als root ausgeführt und bin nicht überrascht, ich habe nicht den Zugriff die Installation möchte einen Pfad wie /usr/lib/node_modules
. Ich lief von einem leeren Verzeichnis und das einzige, was als npm-debug.log
erstellt wurde. Was soll ich machen?
Obwohl Sie keinen Root ausführen, haben Sie Knoten als root installiert (vielleicht indem Sie sudo apt-get install node ausführen) ?), also wird es in Verzeichnisse installiert, in denen nur root Schreibzugriff hat, so dass Sie npm-Module nicht global installieren können, außer wenn Sie root sind oder npm neu konfigurieren, um dies zu berücksichtigen. Sie müssen im Grunde sicherstellen, dass Sie Knoten unter Ihrer normalen ID installieren, und ich würde empfehlen, nvm zu verwenden, um dies zu tun, da es den gesamten Prozess einfach macht. –