NEWS

(gelöst) IOBROKER installation klappt nicht / npm Fehler



  • Habe gerade mal einen Test gemacht und mir einen VM Debian 9.5 Netinstall aufgesetzt um zu schauen ob das Nodejs x6 paket wirklich nicht zum installieren geht.

    Habe mich per SSH auf der VM verbunden mich dann als root angemeldet, dass System auf den krakeelen Stand gebracht.

    Dann habe ich den Install Befehl genommen aus dem Git von nodesource.

    HOffe das hilft euch ein wenig weiter bei der Installation. Darauf ist auch zu achte ob man ein Debian oder ein Ubuntu verwendet. Da sind die Befehle unterschiedlich.

    curl -sL https://deb.nodesource.com/setup_6.x | bash -
    apt-get install -y nodejs
    

    Das ging ohne weiteres zu installieren. Das einzige er hat sich wegen den "curl" Paket beschwert das es nicht vorhanden ist. Nach er Installation konnte ich NodeJs x6 problemlos installieren.

    iobroker@iobroker:~$ su
    Password: 
    root@iobroker:/home/iobroker# curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
    bash: sudo: Kommando nicht gefunden.
    bash: curl: Kommando nicht gefunden.
    root@iobroker:/home/iobroker# apt install curl
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following additional packages will be installed:
      libcurl3
    The following NEW packages will be installed:
      curl libcurl3
    0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
    Need to get 519 kB of archives.
    After this operation, 989 kB of additional disk space will be used.
    Do you want to continue? [Y/n] 
    Get:1 http://debian.lagis.at/debian stretch/main amd64 libcurl3 amd64 7.52.1-5+deb9u6 [291 kB]
    Get:2 http://debian.lagis.at/debian stretch/main amd64 curl amd64 7.52.1-5+deb9u6 [228 kB]
    Fetched 519 kB in 0s (1831 kB/s)
    apt-listchanges: Can't set locale; make sure $LC_* and $LANG are correct!
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    	LANGUAGE = "de_AT:de",
    	LC_ALL = (unset),
    	LC_TIME = "de_DE.UTF-8",
    	LC_MONETARY = "de_DE.UTF-8",
    	LC_ADDRESS = "de_DE.UTF-8",
    	LC_TELEPHONE = "de_DE.UTF-8",
    	LC_NAME = "de_DE.UTF-8",
    	LC_MEASUREMENT = "de_DE.UTF-8",
    	LC_IDENTIFICATION = "de_DE.UTF-8",
    	LC_NUMERIC = "de_DE.UTF-8",
    	LC_PAPER = "de_DE.UTF-8",
    	LANG = "de_AT.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to a fallback locale ("de_AT.UTF-8").
    locale: Kann LC_ALL nicht auf die Standard-Lokale einstellen: Datei oder Verzeichnis nicht gefunden
    Selecting previously unselected package libcurl3:amd64.
    (Reading database ... 27056 files and directories currently installed.)
    Preparing to unpack .../libcurl3_7.52.1-5+deb9u6_amd64.deb ...
    Unpacking libcurl3:amd64 (7.52.1-5+deb9u6) ...
    Selecting previously unselected package curl.
    Preparing to unpack .../curl_7.52.1-5+deb9u6_amd64.deb ...
    Unpacking curl (7.52.1-5+deb9u6) ...
    Setting up libcurl3:amd64 (7.52.1-5+deb9u6) ...
    Processing triggers for libc-bin (2.24-11+deb9u3) ...
    Processing triggers for man-db (2.7.6.1-2) ...
    Setting up curl (7.52.1-5+deb9u6) ...
    root@iobroker:/home/iobroker# curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
    bash: sudo: Kommando nicht gefunden.
    root@iobroker:/home/iobroker# curl -sL https://deb.nodesource.com/setup_6.x | bash -
    
    ## Installing the NodeSource Node.js 6.x LTS Boron repo...
    
    ## Populating apt-get cache...
    
    + apt-get update
    Ign:1 http://debian.lagis.at/debian stretch InRelease
    Hit:2 http://debian.lagis.at/debian stretch-updates InRelease
    Hit:3 http://debian.lagis.at/debian stretch Release                            
    Hit:4 http://security.debian.org/debian-security stretch/updates InRelease     
    Reading package lists... Done                                           
    
    ## Installing packages required for setup: apt-transport-https...
    
    + apt-get install -y apt-transport-https > /dev/null 2>&1
    
    ## Confirming "stretch" is supported...
    
    + curl -sLf -o /dev/null 'https://deb.nodesource.com/node_6.x/dists/stretch/Release'
    
    ## Adding the NodeSource signing key to your keyring...
    
    + curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
    OK
    
    ## Creating apt sources list file for the NodeSource Node.js 6.x LTS Boron repo...
    
    + echo 'deb https://deb.nodesource.com/node_6.x stretch main' > /etc/apt/sources.list.d/nodesource.list
    + echo 'deb-src https://deb.nodesource.com/node_6.x stretch main' >> /etc/apt/sources.list.d/nodesource.list
    
    ## Running `apt-get update` for you...
    
    + apt-get update
    Ign:1 http://debian.lagis.at/debian stretch InRelease
    Hit:2 http://debian.lagis.at/debian stretch-updates InRelease
    Hit:3 http://security.debian.org/debian-security stretch/updates InRelease
    Hit:4 http://debian.lagis.at/debian stretch Release
    Get:5 https://deb.nodesource.com/node_6.x stretch InRelease [4635 B]
    Get:7 https://deb.nodesource.com/node_6.x stretch/main amd64 Packages [1006 B]
    Fetched 5641 B in 0s (11.2 kB/s)
    Reading package lists... Done
    
    ## Run `sudo apt-get install -y nodejs` to install Node.js 6.x LTS Boron and npm
    ## You may also need development tools to build native addons:
         sudo apt-get install gcc g++ make
    ## To install the Yarn package manager, run:
         curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
         echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
         sudo apt-get update && sudo apt-get install yarn
    
    root@iobroker:/home/iobroker# apt-get install -y nodejs
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following NEW packages will be installed:
      nodejs
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Need to get 10.1 MB of archives.
    After this operation, 45.6 MB of additional disk space will be used.
    Get:1 https://deb.nodesource.com/node_6.x stretch/main amd64 nodejs amd64 6.14.3-1nodesource1 [10.1 MB]
    Fetched 10.1 MB in 3s (2849 kB/s) 
    apt-listchanges: Can't set locale; make sure $LC_* and $LANG are correct!
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    	LANGUAGE = "de_AT:de",
    	LC_ALL = (unset),
    	LC_TIME = "de_DE.UTF-8",
    	LC_MONETARY = "de_DE.UTF-8",
    	LC_ADDRESS = "de_DE.UTF-8",
    	LC_TELEPHONE = "de_DE.UTF-8",
    	LC_NAME = "de_DE.UTF-8",
    	LC_MEASUREMENT = "de_DE.UTF-8",
    	LC_IDENTIFICATION = "de_DE.UTF-8",
    	LC_NUMERIC = "de_DE.UTF-8",
    	LC_PAPER = "de_DE.UTF-8",
    	LANG = "de_AT.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to a fallback locale ("de_AT.UTF-8").
    locale: Kann LC_ALL nicht auf die Standard-Lokale einstellen: Datei oder Verzeichnis nicht gefunden
    Selecting previously unselected package nodejs.
    (Reading database ... 27079 files and directories currently installed.)
    Preparing to unpack .../nodejs_6.14.3-1nodesource1_amd64.deb ...
    Unpacking nodejs (6.14.3-1nodesource1) ...
    Setting up nodejs (6.14.3-1nodesource1) ...
    Processing triggers for man-db (2.7.6.1-2) ...
    root@iobroker:/home/iobroker# apt update
    Ign:1 http://debian.lagis.at/debian stretch InRelease
    Hit:2 http://debian.lagis.at/debian stretch-updates InRelease
    Hit:3 http://security.debian.org/debian-security stretch/updates InRelease
    Hit:4 http://debian.lagis.at/debian stretch Release
    Hit:5 https://deb.nodesource.com/node_6.x stretch InRelease
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    All packages are up to date.
    root@iobroker:/home/iobroker# curl -sL https://deb.nodesource.com/setup_6.x | bash -
    
    ## Installing the NodeSource Node.js 6.x LTS Boron repo...
    
    ## Populating apt-get cache...
    
    + apt-get update
    Ign:1 http://debian.lagis.at/debian stretch InRelease
    Hit:2 http://debian.lagis.at/debian stretch-updates InRelease
    Hit:3 http://security.debian.org/debian-security stretch/updates InRelease
    Hit:4 http://debian.lagis.at/debian stretch Release
    Hit:5 https://deb.nodesource.com/node_6.x stretch InRelease
    Reading package lists... Done
    
    ## Confirming "stretch" is supported...
    
    + curl -sLf -o /dev/null 'https://deb.nodesource.com/node_6.x/dists/stretch/Release'
    
    ## Adding the NodeSource signing key to your keyring...
    
    + curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
    OK
    
    ## Creating apt sources list file for the NodeSource Node.js 6.x LTS Boron repo...
    
    + echo 'deb https://deb.nodesource.com/node_6.x stretch main' > /etc/apt/sources.list.d/nodesource.list
    + echo 'deb-src https://deb.nodesource.com/node_6.x stretch main' >> /etc/apt/sources.list.d/nodesource.list
    
    ## Running `apt-get update` for you...
    
    + apt-get update
    Ign:1 http://debian.lagis.at/debian stretch InRelease
    Hit:2 http://debian.lagis.at/debian stretch-updates InRelease
    Hit:3 http://security.debian.org/debian-security stretch/updates InRelease
    Hit:4 http://debian.lagis.at/debian stretch Release
    Hit:5 https://deb.nodesource.com/node_6.x stretch InRelease
    Reading package lists... Done
    
    ## Run `sudo apt-get install -y nodejs` to install Node.js 6.x LTS Boron and npm
    ## You may also need development tools to build native addons:
         sudo apt-get install gcc g++ make
    ## To install the Yarn package manager, run:
         curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
         echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
         sudo apt-get update && sudo apt-get install yarn
    
    root@iobroker:/home/iobroker# nodejs -v
    v6.14.3
    root@iobroker:/home/iobroker# npm -v
    3.10.10
    root@iobroker:/home/iobroker# 
    
    


  • Bin hier gerade am weiter forschen. Habe ich mit zu früh gefreut das node, nodejs und npm installiert wird. Bei der Installation von ioBorker gibt es dann die Probleme.

    Wenn man den Befehl ausführen will unter /opt/iobroker
    > npm install iobroker –unsafe-perm
    Da kommen dann jede Menge error

    root@iobroker:/opt/iobroker# npm install --unsafe-perm iobroker
    npm ERR! not a package /opt/iobroker/iobroker
    npm ERR! addLocal Could not install /opt/iobroker/iobroker
    npm ERR! Linux 4.9.0-7-amd64
    npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "--unsafe-perm" "iobroker"
    npm ERR! node v6.14.3
    npm ERR! npm  v3.10.10
    npm ERR! path /tmp/npm-1236-88d2e991/unpack-03c99222/package.json
    npm ERR! code ENOENT
    npm ERR! errno -2
    npm ERR! syscall open
    
    npm ERR! enoent ENOENT: no such file or directory, open '/tmp/npm-1236-88d2e991/unpack-03c99222/package.json'
    npm ERR! enoent ENOENT: no such file or directory, open '/tmp/npm-1236-88d2e991/unpack-03c99222/package.json'
    npm ERR! enoent This is most likely not a problem with npm itself
    npm ERR! enoent and is related to npm not being able to find a file.
    npm ERR! enoent 
    
    npm ERR! Please include the following file with any support request:
    npm ERR!     /opt/iobroker/npm-debug.log
    
    

    Hier auch noch der Log aus /opt/iobroker/npm-debug.log Hoffe das hilft euch weiter.

    0 info it worked if it ends with ok
    1 verbose cli [ '/usr/bin/node',
    1 verbose cli   '/usr/bin/npm',
    1 verbose cli   'install',
    1 verbose cli   '--unsafe-perm',
    1 verbose cli   'iobroker' ]
    2 info using npm@3.10.10
    3 info using node@v6.14.3
    4 silly loadCurrentTree Starting
    5 silly install loadCurrentTree
    6 silly install readLocalPackageData
    7 silly fetchPackageMetaData iobroker
    8 silly fetchOtherPackageData iobroker
    9 silly cache add args [ 'iobroker', null ]
    10 verbose cache add spec iobroker
    11 silly cache add parsed spec Result {
    11 silly cache add   raw: 'iobroker',
    11 silly cache add   scope: null,
    11 silly cache add   escapedName: 'iobroker',
    11 silly cache add   name: null,
    11 silly cache add   rawSpec: 'iobroker',
    11 silly cache add   spec: '/opt/iobroker/iobroker',
    11 silly cache add   type: 'local' }
    12 silly addLocalTarball shasum (computed) 172d89ea6df6ab508c7b69dc0540b583db07e40c
    13 verbose addTmpTarball /opt/iobroker/iobroker not in flight; adding
    14 verbose correctMkdir /root/.npm correctMkdir not in flight; initializing
    15 verbose addTmpTarball validating metadata from /opt/iobroker/iobroker
    16 verbose tar unpack /opt/iobroker/iobroker
    17 verbose tar unpacking to /tmp/npm-1236-88d2e991/unpack-03c99222
    18 silly gentlyRm /tmp/npm-1236-88d2e991/unpack-03c99222 is being purged
    19 verbose gentlyRm don't care about contents; nuking /tmp/npm-1236-88d2e991/unpack-03c99222
    20 silly gunzTarPerm modes [ '755', '644' ]
    21 error not a package /opt/iobroker/iobroker
    22 error addLocal Could not install /opt/iobroker/iobroker
    23 silly fetchPackageMetaData Error: ENOENT: no such file or directory, open '/tmp/npm-1236-88d2e991/unpack-03c99222/package.json'
    23 silly fetchPackageMetaData     at Error (native)
    23 silly fetchPackageMetaData  error for iobroker { Error: ENOENT: no such file or directory, open '/tmp/npm-1236-88d2e991/unpack-03c99222/package.json'
    23 silly fetchPackageMetaData     at Error (native)
    23 silly fetchPackageMetaData   errno: -2,
    23 silly fetchPackageMetaData   code: 'ENOENT',
    23 silly fetchPackageMetaData   syscall: 'open',
    23 silly fetchPackageMetaData   path: '/tmp/npm-1236-88d2e991/unpack-03c99222/package.json' }
    24 silly rollbackFailedOptional Starting
    25 silly rollbackFailedOptional Finishing
    26 silly runTopLevelLifecycles Finishing
    27 silly install printInstalled
    28 verbose stack Error: ENOENT: no such file or directory, open '/tmp/npm-1236-88d2e991/unpack-03c99222/package.json'
    28 verbose stack     at Error (native)
    29 verbose cwd /opt/iobroker
    
    


  • Probiere mal npm auf v4 zu upgraden. Ich hatte Probleme sowie mit npm v3.x als mit v6.

    npm install -g npm@4

    Es ist auch möglich es gibts ein alten lokalen Version 2.x auf npm in ein von die Unterverzeichnisse von ioBroker. Die kann entfernt werden.


Log in to reply
 

Suggested Topics

1.4k
Online

32.4k
Users

39.0k
Topics

528.7k
Posts