Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Installation on NAS Synology DS1513+ #8

Closed
ghost opened this issue Jan 11, 2017 · 41 comments
Closed

Installation on NAS Synology DS1513+ #8

ghost opened this issue Jan 11, 2017 · 41 comments

Comments

@ghost
Copy link

ghost commented Jan 11, 2017

I am trying to install command-line interface on my nas (synology 1513+ DSM 6.0.2-8451 Update 7):
sudo npm install -g storjshare-daemon

But I am getting error:
npm WARN engine storj-lib@6.0.11: wanted: {"node":"^6.9.1"} (current: {"node":"4.4.2","npm":"2.15.0"})
npm WARN deprecated node-uuid@1.4.7: use uuid module instead

weak@1.0.1 install /usr/local/lib/node_modules/storjshare-daemon/node_modules/dnode/node_modules/weak
node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.4.2"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/storjshare-daemon/node_modules/dnode/node_modules/weak/.node-gyp"
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:63:19)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:72:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:81:16
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Linux 3.10.77
gyp ERR! command "/volume1/@appstore/Node.js_v4/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/storjshare-daemon/node_modules/dnode/node_modules/weak
gyp ERR! node -v v4.4.2
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN engine kad@1.6.4: wanted: {"node":"4.x.x 6.x.x"} (current: {"node":"4.4.2","npm":"2.15.0"})
npm WARN optional dep failed, continuing weak@1.0.1

tldjs@1.7.0 postinstall /usr/local/lib/node_modules/storjshare-daemon/node_modules/storj-lib/node_modules/diglet/node_modules/tldjs
node ./bin/postinstall.js

npm WARN deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

dtrace-provider@0.6.0 install /usr/local/lib/node_modules/storjshare-daemon/node_modules/storj-lib/node_modules/restify/node_modules/dtrace-provider
node scripts/install.js

dtrace-provider@0.8.0 install /usr/local/lib/node_modules/storjshare-daemon/node_modules/storj-lib/node_modules/diglet/node_modules/bunyan/node_modules/dtrace-provider
node scripts/install.js

dtrace-provider@0.8.0 install /usr/local/lib/node_modules/storjshare-daemon/node_modules/storj-lib/node_modules/restify/node_modules/bunyan/node_modules/dtrace-provider
node scripts/install.js

secp256k1@3.2.5 install /usr/local/lib/node_modules/storjshare-daemon/node_modules/storj-lib/node_modules/secp256k1
prebuild-install || node-gyp rebuild || echo "Secp256k1 bindings compilation fail. Pure JS implementation will be used."

prebuild-install info begin Prebuild-install version 2.1.0
prebuild-install info looking for local prebuild @ prebuilds/secp256k1-v3.2.5-node-v46-linux-x64.tar.gz
prebuild-install WARN install EACCES: permission denied, access '/root/.npm'
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.4.2"
attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/storjshare-daemon/node_modules/storj-lib/node_modules/secp256k1/.node-gyp"
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:63:19)
ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:72:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:81:16
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Linux 3.10.77
gyp ERR! command "/volume1/@appstore/Node.js_v4/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/storjshare-daemon/node_modules/storj-lib/node_modules/secp256k1
gyp ERR! node -v v4.4.2
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
Secp256k1 bindings compilation fail. Pure JS implementation will be used.

leveldown@1.5.3 install /usr/local/lib/node_modules/storjshare-daemon/node_modules/storj-lib/node_modules/leveldown
prebuild --install

prebuild info begin Prebuild version 5.1.2
prebuild info looking for local prebuild @ prebuilds/leveldown-v1.5.3-node-v46-linux-x64.tar.gz
prebuild WARN install EACCES: permission denied, access '/root/.npm'
prebuild info install We will now try to compile from source.
prebuild ERR! build error
prebuild ERR! stack Error: not found: make
prebuild ERR! stack at getNotFoundError (/usr/local/lib/node_modules/storjshare-daemon/node_modules/storj-lib/node_modules/leveldown/node_modules/prebuild/node_modules/node-gyp/node_modules/which/which.js:13:12)
prebuild ERR! stack at F (/usr/local/lib/node_modules/storjshare-daemon/node_modules/storj-lib/node_modules/leveldown/node_modules/prebuild/node_modules/node-gyp/node_modules/which/which.js:68:19)
prebuild ERR! stack at E (/usr/local/lib/node_modules/storjshare-daemon/node_modules/storj-lib/node_modules/leveldown/node_modules/prebuild/node_modules/node-gyp/node_modules/which/which.js:80:29)
prebuild ERR! stack at /usr/local/lib/node_modules/storjshare-daemon/node_modules/storj-lib/node_modules/leveldown/node_modules/prebuild/node_modules/node-gyp/node_modules/which/which.js:89:16
prebuild ERR! stack at /usr/local/lib/node_modules/storjshare-daemon/node_modules/storj-lib/node_modules/leveldown/node_modules/prebuild/node_modules/node-gyp/node_modules/which/node_modules/isexe/index.js:44:5
prebuild ERR! stack at /usr/local/lib/node_modules/storjshare-daemon/node_modules/storj-lib/node_modules/leveldown/node_modules/prebuild/node_modules/node-gyp/node_modules/which/node_modules/isexe/access.js:8:5
prebuild ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
prebuild ERR! not ok
prebuild ERR! build Error: not found: make
prebuild ERR! build at getNotFoundError (/usr/local/lib/node_modules/storjshare-daemon/node_modules/storj-lib/node_modules/leveldown/node_modules/prebuild/node_modules/node-gyp/node_modules/which/which.js:13:12)
prebuild ERR! build at F (/usr/local/lib/node_modules/storjshare-daemon/node_modules/storj-lib/node_modules/leveldown/node_modules/prebuild/node_modules/node-gyp/node_modules/which/which.js:68:19)
prebuild ERR! build at E (/usr/local/lib/node_modules/storjshare-daemon/node_modules/storj-lib/node_modules/leveldown/node_modules/prebuild/node_modules/node-gyp/node_modules/which/which.js:80:29)
prebuild ERR! build at /usr/local/lib/node_modules/storjshare-daemon/node_modules/storj-lib/node_modules/leveldown/node_modules/prebuild/node_modules/node-gyp/node_modules/which/which.js:89:16
prebuild ERR! build at /usr/local/lib/node_modules/storjshare-daemon/node_modules/storj-lib/node_modules/leveldown/node_modules/prebuild/node_modules/node-gyp/node_modules/which/node_modules/isexe/index.js:44:5
prebuild ERR! build at /usr/local/lib/node_modules/storjshare-daemon/node_modules/storj-lib/node_modules/leveldown/node_modules/prebuild/node_modules/node-gyp/node_modules/which/node_modules/isexe/access.js:8:5
prebuild ERR! build at FSReqWrap.oncomplete (fs.js:82:15)
npm ERR! Linux 3.10.77
npm ERR! argv "/volume1/@appstore/Node.js_v4/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "storjshare-daemon"
npm ERR! node v4.4.2
npm ERR! npm v2.15.0
npm ERR! code ELIFECYCLE

npm ERR! leveldown@1.5.3 install: prebuild --install
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the leveldown@1.5.3 install script 'prebuild --install'.
npm ERR! This is most likely a problem with the leveldown package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! prebuild --install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs leveldown
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls leveldown
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /volume1/homes/admin/npm-debug.log
npm-debug.txt

@ghost ghost changed the title install on synology 1513+ DSM 6.0.2-8451 Update 7 install on nas Jan 11, 2017
@JeromeGillard
Copy link

  1. 'make' seems not installed. Use apt-get install build-essential
  2. On my synology, I had to use --unsafe-perm every time with npm so: sudo npm install -g storjshare-daemon --unsafe-perm

@ghost
Copy link
Author

ghost commented Jan 11, 2017

I am trying step 1. But get error:

sudo: apt-get: command not found
-sh: apt-get: command not found

@JeromeGillard
Copy link

Synology do not allow it directly. You have to install the Debian Chroot package.
See http://blog.storj.io/post/127256189103/installing-dataserv-client-on-a-synology-nas-using

@44203 44203 closed this as completed Jan 11, 2017
@ghost
Copy link
Author

ghost commented Jan 11, 2017

By the way, I am only have node 4.4.2.
What about this line:

wanted: {"node":"^6.9.1"} (current: {"node":"4.4.2","npm":"2.15.0"})

@ghost
Copy link
Author

ghost commented Jan 11, 2017

I am on the step 2:

  1. Go back to the Package Center and install Python (by the Python Software Foundation) and Debian Chroot packages. Remember which volume you install Debian Chroot, as you will need this information later.

There are Python Module and Python3. I installed both.
There is no Debian Chroot.

What can I do now?

@44203
Copy link
Contributor

44203 commented Jan 11, 2017

You need node 6.9.1

@ghost
Copy link
Author

ghost commented Jan 11, 2017

Sorry,
I am following http://blog.storj.io/post/127256189103/installing-dataserv-client-on-a-synology-nas-using

There is no Debian Chroot in the package center after adding the community resource.

Should I think about node 6.9.1 or try to install Debian Chroot manually?

@44203
Copy link
Contributor

44203 commented Jan 11, 2017

That tutorial is quite old and is no longer entirely relevant. Maybe @littleskunk can help you?

@ghost
Copy link
Author

ghost commented Jan 11, 2017

Sorry, how can I contact @littleskunk ?

@44203
Copy link
Contributor

44203 commented Jan 11, 2017

Like that :) He should get notified.

@ghost
Copy link
Author

ghost commented Jan 11, 2017

Sorry. Debian Chroot found. Thanks to https://www.reddit.com/r/synology/comments/56c9d7/package_center_doesnt_show_any_packages_from/
It was under community tab at the bottom of the list on the left. It doesn't appear if you just use search field and type in 'Chroot' or 'Debian'.
I am going further.

@ghost
Copy link
Author

ghost commented Jan 11, 2017

I am at the step:

  1. At the prompt DISKSTATION>, start Debian Chroot by entering the text below.
    DISKSTATION> /var/packages/debian-chroot/scripts/start-stop-status chroot

I get warning:

bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)

And finally get:

root@DiskStation:/#

Then at the next step:

  1. At the new prompt, enter the following:
    root@DISKSTATION:/# apt-get update

I get error:

bash: apt-get: command not found

So, what can I do next?

@ghost
Copy link
Author

ghost commented Jan 12, 2017

Got through

bash: apt-get: command not found

Thanks to SynoCommunity/spksrc#2327
Removed community Python and Debian Chroot
Installed community Python 2.7 and Debian Chroot
Waited a few minutes (dpkg really finished 2 minutes later after package center complete message) and started Debian Chroot. This time it was running, after restart as well.
I can not login to Diskstation as root with admin password. (There is a discussion here https://forum.synology.com/enu/viewtopic.php?t=96267.) But I could connect as admin and run
cd /
sudo -s /var/packages/debian-chroot/scripts/start-stop-status chroot

I still get warning:

bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)

And finally get:

root@DiskStation:/#

Then at the next step apt-get update works!

@JeromeGillard
Copy link

On Synology, you must use sudo -i

For the locale warning, see the spksrc reader instructions :

Update: type apt-get update followed by apt-get upgrade Locales: type apt-get install locales and then dpkg-reconfigure locales Timezone: execute dpkg-reconfigure tzdata

@ghost
Copy link
Author

ghost commented Jan 12, 2017

On step 10
pip3 install dataserv-client –upgrade
Get error:

Downloading/unpacking dataserv-upgrade
Could not find any downloads that satisfy the requirement dataserv-upgrade
Cleaning up...
No distributions at all found for dataserv-upgrade
Storing debug log for failure in /root/.pip/pip.log

...

@JeromeGillard
Copy link

dataserv-cli is deprecated. You should install storjshare-daemon by npm.

P.s. python 3 (pip3) seems not supported. Stick to python 2

@ghost
Copy link
Author

ghost commented Jan 12, 2017

When I do:
cd /
sudo -i /var/packages/debian-chroot/scripts/start-stop-status chroot

I receive:

-ash: var/packages/debian-chroot/scripts/start-stop-status: No such file or directory

So I continue with sudo -s...

@ghost
Copy link
Author

ghost commented Jan 12, 2017

So I do:

apt-get install node
ok
apt-get install npm
ok
npm install -g storjshare-daemon
error:

The authenticity of host 'github.com (192.30.253.112)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
/e you sure you want to continue connecting (yes/no)? /
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace Cloning into bare repository '/root/.npm/_git-remotes/git-github-com-github-littleskunk-fd-diskspace-14434309'...
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace Warning: Permanently added 'github.com,192.30.253.112' (RSA) to the list of known hosts.
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace Permission denied (publickey).
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace fatal: Could not read from remote repository.
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace Please make sure you have the correct access rights
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace and the repository exists.
npm ERR! notarget No compatible version found: fd-diskspace@'github:littleskunk/fd-diskspace#2866a4cf147649d97f81fb33464bcbf0f8176bd5'
npm ERR! notarget Valid install targets:
npm ERR! notarget ["1.0.0"]
npm ERR! notarget
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! System Linux 3.10.77
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "storjshare-daemon"
npm ERR! cwd /
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ETARGET
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /npm-debug.log
npm ERR! not ok code 0
root@DiskStation:/# npm install -g storjshare-daemon
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace Cloning into bare repository '/root/.npm/_git-remotes/git-github-com-github-littleskunk-fd-diskspace-14434309'...
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace Permission denied (publickey).
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace fatal: Could not read from remote repository.
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace Please make sure you have the correct access rights
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace and the repository exists.
npm ERR! notarget No compatible version found: fd-diskspace@'github:littleskunk/fd-diskspace#2866a4cf147649d97f81fb33464bcbf0f8176bd5'
npm ERR! notarget Valid install targets:
npm ERR! notarget ["1.0.0"]
npm ERR! notarget
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! System Linux 3.10.77
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "storjshare-daemon"
npm ERR! cwd /
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ETARGET
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /npm-debug.log
npm ERR! not ok code 0

@JeromeGillard
Copy link

You have to do it in several steps. Here's my tipical way to connect from the start:

login as: jgi
jgi@JGI02's password:
jgi@JGI02:~$ sudo -i
Password:
root@JGI02:~# /var/packages/debian-chroot/scripts/start-stop-status chroot
root@JGI02:/#

@ghost
Copy link
Author

ghost commented Jan 12, 2017

Thank you for clarification concerning sudo -i.
Now sudo -i works!
There is problem with npm install -g storjshare-daemon.
Any ideas?

@JeromeGillard
Copy link

I see again some 'Permission denied'. Have you tried npm install -g storjshare-daemon --unsafe-perm?

@ghost
Copy link
Author

ghost commented Jan 12, 2017

I have just tried with the same result:

root@DiskStation:/# npm install -g storjshare-daemon --unsafe-perm
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace Cloning into bare repository '/root/.npm/_git-remotes/git-github-com-github-littleskunk-fd-diskspace-14434309'...
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace Permission denied (publickey).
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace fatal: Could not read from remote repository.
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace Please make sure you have the correct access rights
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace and the repository exists.
npm ERR! notarget No compatible version found: fd-diskspace@'github:littleskunk/fd-diskspace#2866a4cf147649d97f81fb33464bcbf0f8176bd5'
npm ERR! notarget Valid install targets:
npm ERR! notarget ["1.0.0"]
npm ERR! notarget
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! System Linux 3.10.77
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "storjshare-daemon" "--unsafe-perm"
npm ERR! cwd /
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ETARGET
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /npm-debug.log
npm ERR! not ok code 0

@44203
Copy link
Contributor

44203 commented Jan 12, 2017

Not sure if this will help, but try:

ssh-keygen -t rsa

Go through the questions, just hitting return (use the defaults) and don't set a password. Then try this again. If it works, I know what can be done to resolve it.

@ghost
Copy link
Author

ghost commented Jan 12, 2017

The same output after running ssh-keygen -t rsa

root@DiskStation:/# npm install -g storjshare-daemon --unsafe-perm
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace Cloning into bare repository '/root/.npm/_git-remotes/git-github-com-github-littleskunk-fd-diskspace-14434309'...
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace Permission denied (publickey).
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace fatal: Could not read from remote repository.
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace Please make sure you have the correct access rights
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace and the repository exists.
npm ERR! notarget No compatible version found: fd-diskspace@'github:littleskunk/fd-diskspace#2866a4cf147649d97f81fb33464bcbf0f8176bd5'
npm ERR! notarget Valid install targets:
npm ERR! notarget ["1.0.0"]
npm ERR! notarget
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! System Linux 3.10.77
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "storjshare-daemon" "--unsafe-perm"
npm ERR! cwd /
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ETARGET
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /npm-debug.log
npm ERR! not ok code 0

root@DiskStation:/# npm install -g storjshare-daemon
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace Cloning into bare repository '/root/.npm/_git-remotes/git-github-com-github-littleskunk-fd-diskspace-14434309'...
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace Permission denied (publickey).
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace fatal: Could not read from remote repository.
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace Please make sure you have the correct access rights
npm ERR! git clone git@github.com:github:littleskunk/fd-diskspace and the repository exists.
npm ERR! notarget No compatible version found: fd-diskspace@'github:littleskunk/fd-diskspace#2866a4cf147649d97f81fb33464bcbf0f8176bd5'
npm ERR! notarget Valid install targets:
npm ERR! notarget ["1.0.0"]
npm ERR! notarget
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! System Linux 3.10.77
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "storjshare-daemon"
npm ERR! cwd /
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ETARGET
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /npm-debug.log
npm ERR! not ok code 0

@44203
Copy link
Contributor

44203 commented Jan 12, 2017

Okay try this:

npm install -g bookchin/storjshare-daemon#httpdep --unsafe-perm

@ghost
Copy link
Author

ghost commented Jan 12, 2017

root@DiskStation:/# npm install -g bookchin/storjshare-daemon#httpdep

returns error. Output in pdf attached. It seems the node version is not enough:

wanted: {"node":"^6.9.1"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine deep-extend@0.4.1: wanted: {"node":">=0.12.0","iojs":">=1.0.0"} (current: {"node":"0.10.29","npm":"1.4.21"})

output.pdf

@44203
Copy link
Contributor

44203 commented Jan 12, 2017

yes, you need node 6

@ghost
Copy link
Author

ghost commented Jan 12, 2017

Please, let me know how.

I try:

root@DiskStation:/# apt-get install node

But it doesn't upgrade:

Reading package lists... Done
Building dependency tree
Reading state information... Done
node is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 34 not upgraded.

@44203
Copy link
Contributor

44203 commented Jan 12, 2017

the version in the repositories is outdated, follow the instructions here: https://github.com/Storj/storjshare-daemon#nodejs--npm

@ghost
Copy link
Author

ghost commented Jan 12, 2017

Okey.
I do
root@DiskStation:/# curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
I get error:

bash: curl: command not found
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)

What's wrong?

@44203
Copy link
Contributor

44203 commented Jan 12, 2017

You must be new to GNU+Linux? You need to install the curl program.

apt install curl

@44203
Copy link
Contributor

44203 commented Jan 12, 2017

I'm happy to help you, but there is a difference between supporting this package and teaching gnu+linux basics. Remember duckduckgo.com is your friend for a lot of this stuff.

https://duckduckgo.com/?q=bash%3A+curl%3A+command+not+found&t=h_&ia=qa

@ghost ghost changed the title install on nas How to install on NAS Synology 1513+ Jan 12, 2017
@ghost ghost changed the title How to install on NAS Synology 1513+ How to install on NAS Synology 1513+? Jan 12, 2017
@ghost
Copy link
Author

ghost commented Jan 12, 2017

Thank you for the tip! You are too kind to me!
I am not new to gnu+linux (if since 20+ years ago is not new), but I am rare to it, and forget everything after I am done.

So,
apt install curl
ok
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
ok

Then
nvm install 6.9.1

bash: nvm: command not found

Thanks to https://www.digitalocean.com/community/tutorials/how-to-install-node-js-with-nvm-node-version-manager-on-a-vps

source ~/.profile
ok
nvm install 6.9.1
ok
apt install git python build-essential
ok

And finally,
root@DiskStation:/# npm install -g storjshare-daemon

npm WARN deprecated node-uuid@1.4.7: use uuid module instead
npm WARN deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
/root/.nvm/versions/node/v6.9.1/bin/storjshare -> /root/.nvm/versions/node/v6.9.1/lib/node_modules/storjshare-daemon/bin/storjshare.js
/root/.nvm/versions/node/v6.9.1/bin/storjshare-start -> /root/.nvm/versions/node/v6.9.1/lib/node_modules/storjshare-daemon/bin/storjshare-start.js
/root/.nvm/versions/node/v6.9.1/bin/storjshare-stop -> /root/.nvm/versions/node/v6.9.1/lib/node_modules/storjshare-daemon/bin/storjshare-stop.js
/root/.nvm/versions/node/v6.9.1/bin/storjshare-restart -> /root/.nvm/versions/node/v6.9.1/lib/node_modules/storjshare-daemon/bin/storjshare-restart.js
/root/.nvm/versions/node/v6.9.1/bin/storjshare-status -> /root/.nvm/versions/node/v6.9.1/lib/node_modules/storjshare-daemon/bin/storjshare-status.js
/root/.nvm/versions/node/v6.9.1/bin/storjshare-logs -> /root/.nvm/versions/node/v6.9.1/lib/node_modules/storjshare-daemon/bin/storjshare-logs.js
/root/.nvm/versions/node/v6.9.1/bin/storjshare-killall -> /root/.nvm/versions/node/v6.9.1/lib/node_modules/storjshare-daemon/bin/storjshare-killall.js
/root/.nvm/versions/node/v6.9.1/bin/storjshare-destroy -> /root/.nvm/versions/node/v6.9.1/lib/node_modules/storjshare-daemon/bin/storjshare-destroy.js
/root/.nvm/versions/node/v6.9.1/bin/storjshare-daemon -> /root/.nvm/versions/node/v6.9.1/lib/node_modules/storjshare-daemon/bin/storjshare-daemon.js
/root/.nvm/versions/node/v6.9.1/bin/storjshare-create -> /root/.nvm/versions/node/v6.9.1/lib/node_modules/storjshare-daemon/bin/storjshare-create.js

dtrace-provider@0.8.0 install /root/.nvm/versions/node/v6.9.1/lib/node_modules/storjshare-daemon/node_modules/dtrace-provider
node scripts/install.js

dtrace-provider@0.6.0 install /root/.nvm/versions/node/v6.9.1/lib/node_modules/storjshare-daemon/node_modules/restify/node_modules/dtrace-provider
node scripts/install.js

weak@1.0.1 install /root/.nvm/versions/node/v6.9.1/lib/node_modules/storjshare-daemon/node_modules/weak
node-gyp rebuild

gyp ERR! configure error
gyp ERR! stack Error: EACCES, mkdir '/root/.nvm/versions/node/v6.9.1/lib/node_modules/storjshare-daemon/node_modules/weak/build'
gyp ERR! System Linux 3.10.77
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /root/.nvm/versions/node/v6.9.1/lib/node_modules/storjshare-daemon/node_modules/weak
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok

secp256k1@3.2.5 install /root/.nvm/versions/node/v6.9.1/lib/node_modules/storjshare-daemon/node_modules/secp256k1
prebuild-install || node-gyp rebuild || echo "Secp256k1 bindings compilation fail. Pure JS implementation will be used."

sh: 1: prebuild-install: Permission denied
gyp ERR! configure error
gyp ERR! stack Error: EACCES, mkdir '/root/.nvm/versions/node/v6.9.1/lib/node_modules/storjshare-daemon/node_modules/secp256k1/build'
gyp ERR! System Linux 3.10.77
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /root/.nvm/versions/node/v6.9.1/lib/node_modules/storjshare-daemon/node_modules/secp256k1
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
Secp256k1 bindings compilation fail. Pure JS implementation will be used.

leveldown@1.5.3 install /root/.nvm/versions/node/v6.9.1/lib/node_modules/storjshare-daemon/node_modules/leveldown
prebuild --install

sh: 1: prebuild: Permission denied
/root/.nvm/versions/node/v6.9.1/lib
└── (empty)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: dtrace-provider@0.8.0 (node_modules/storjshare-daemon/node_modules/dtrace-provider):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: dtrace-provider@0.8.0 install: node scripts/install.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: dtrace-provider@0.6.0 (node_modules/storjshare-daemon/node_modules/restify/node_modules/dtrace-provider):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: dtrace-provider@0.6.0 install: node scripts/install.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: weak@1.0.1 (node_modules/storjshare-daemon/node_modules/weak):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: weak@1.0.1 install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm ERR! Linux 3.10.77
npm ERR! argv "/root/.nvm/versions/node/v6.9.1/bin/node" "/root/.nvm/versions/node/v6.9.1/bin/npm" "install" "-g" "storjshare-daemon"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! leveldown@1.5.3 install: prebuild --install
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the leveldown@1.5.3 install script 'prebuild --install'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the leveldown package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! prebuild --install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs leveldown
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls leveldown
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /npm-debug.log
npm ERR! code 1

Is it ok or not? What can I do now?

@ghost ghost changed the title How to install on NAS Synology 1513+? Installation on NAS Synology 1513+ Jan 12, 2017
@44203
Copy link
Contributor

44203 commented Jan 12, 2017

Almost there. So you are root, so you need to add the --unsafe-perm option. So that's:

npm install -g storjshare-daemon --unsafe-perm

@ghost
Copy link
Author

ghost commented Jan 13, 2017

I am there :) Thank you for the patience! Output is attached.
output.pdf

May I ask a question?
Why if I start a new terminal session the node version is again "0.10.29", not "6.9.1"?

I did:
root@DiskStation:/# npm install -g storjshare-daemon --unsafe-perm
and got error:

npm WARN engine storj-lib@6.0.12: wanted: {"node":"^6.9.1"} (current: {"node":"0.10.29","npm":"1.4.21"})

Then I did
root@DiskStation:/# nvm install 6.9.1
and got:

v6.9.1 is already installed.
Now using node v6.9.1 (npm v3.10.8)

Should I do this everytime?

And finally:
root@DiskStation:/# npm install -g storjshare-daemon --unsafe-perm
ok

@ghost ghost changed the title Installation on NAS Synology 1513+ Installation on NAS Synology DS1513+ Jan 13, 2017
@44203
Copy link
Contributor

44203 commented Jan 13, 2017

You should remove the version you installed from apt.

apt remove node

@ghost
Copy link
Author

ghost commented Jan 16, 2017

Thank you so much!

root@DiskStation:/# node --version

v6.9.1

@ghost
Copy link
Author

ghost commented Jan 16, 2017

I was trying to access my NAS shared folders from chroot to specify one of them in storage option. Thanks to @littleskunk who helped me with this link: https://markpith.wordpress.com/2015/10/26/debian-chroot-on-synology-nas/

So:

inside chroot: mkdir /storj

outside chroot: add to var/packages/debian-chroot/scripts/start-stop-status:

under # Make sure we don't mount twice:
grep -q "${CHROOTTARGET}/storj " /volume1/storj || mount -o bind /volume1/storj ${CHROOTTARGET}/storj, and

under # Unmount:
umount ${CHROOTTARGET}/storj,

where /volume1/storj is a folder created from control panel on the NAS especially for storj project data.

@ghost
Copy link
Author

ghost commented Mar 16, 2017

Now, I would like to set up starting storjshare daemon after NAS reboot...

@littleskunk
Copy link
Collaborator

crontab

@ghost
Copy link
Author

ghost commented Mar 16, 2017

hi, I am trying to start storjshare daemon automatically at startup. I added in crontab the following string:

@reboot root storjshare daemon && storjshare start --config /storj/a/config && storjshare start --config /storj/b/config

Then I exit chroot and reboot, after reboot, I enter debian chroot, but daemon is not running.
Could you give me some hint?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants