Skip to content
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

cant install #44

Closed
Cozy19 opened this issue Jun 17, 2019 · 3 comments
Closed

cant install #44

Cozy19 opened this issue Jun 17, 2019 · 3 comments

Comments

@Cozy19
Copy link

Cozy19 commented Jun 17, 2019

Hello i cannot install ffmpeg-concat on Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-51-generic x86_64)
full cli output:

root@vmi264345:~/node_modules# npm install -g ffmpeg-concat
npm WARN deprecated [email protected]: use String.prototype.padStart()
/usr/local/bin/ffmpeg-concat -> /usr/local/lib/node_modules/ffmpeg-concat/index.js

> [email protected] install /usr/local/lib/node_modules/ffmpeg-concat/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

ERR! sharp EACCES: permission denied, mkdir '/root/.npm'
info sharp Attempting to build from source via node-gyp but this may fail due to the above error
info sharp Please see https://sharp.pixelplumbing.com/page/install for required dependencies
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/8.10.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/ffmpeg-concat/node_modules/sharp/.n                                                                                                             ode-gyp"
make: Entering directory '/usr/local/lib/node_modules/ffmpeg-concat/node_modules/sharp/build'
  TOUCH Release/obj.target/libvips-cpp.stamp
  CXX(target) Release/obj.target/sharp/src/common.o
../src/common.cc:25:10: fatal error: vips/vips8: No such file or directory
 #include <vips/vips8>
          ^~~~~~~~~~~~
compilation terminated.
sharp.target.mk:128: recipe for target 'Release/obj.target/sharp/src/common.o' failed
make: *** [Release/obj.target/sharp/src/common.o] Error 1
make: Leaving directory '/usr/local/lib/node_modules/ffmpeg-concat/node_modules/sharp/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/ffmpeg-concat/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.15.0-51-generic
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/ffmpeg-concat/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/ffmpeg-concat/node_modules/sharp
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v4.0.0
gyp ERR! not ok
/usr/local/lib
└── (empty)

npm ERR! Linux 4.15.0-51-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "ffmpeg-concat"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node                                                                                                              install/dll-copy)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script '(node install/libvips && node install/dll-copy && prebuild-install) || (node                                                                                                             -gyp rebuild && node install/dll-copy)'.
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 sharp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs sharp
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls sharp
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /root/node_modules/npm-debug.log
npm ERR! code 1
@redlotusaustin
Copy link

I'm having the same issue.

@transitive-bullshit
Copy link
Owner

This error is saying that it can't install the sharp dependency which is an image processing library. Please check or post to their repo for troubleshooting.

From a quick search through their issues, it looks like you may need to manually install libvips (source). Changing your Node.js version may also work as it'll download a precompiled version of sharp instead of trying to compile it fresh.

Please follow-up with the sharp repo.

Thanks!

@redlotusaustin
Copy link

redlotusaustin commented Aug 21, 2019

@transitive-bullshit You were correct about changing the Node.js version fixing that issue, thank you!

@Cozy19 If you're still having a problem installing ffmpeg-concat on Ubuntu 18.04 as root, it's probably because the version of Node.js in the default repos is out of date. You can update it and it should work, try this:

`

Clean out the old Node stuff

apt remove --purge nodejs npm
apt clean
apt autoclean
apt install -f
apt autoremove
rm -rf /usr/lib/node_modules/*

Install the Node PPA

curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh
chmod +x nodesource_setup.sh
./nodesource_setup.sh

Install Node & NPM (one command)

apt install -y nodejs

Install ffmpeg-concat

npm install --unsafe-perm -g ffmpeg-concat
`
I had to add the "--unsafe-perm" to be able to install, otherwise it would fail on the node-gyp dependancy.

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

No branches or pull requests

3 participants