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

Not support alpine linux #70

Closed
huan opened this issue Nov 1, 2016 · 2 comments
Closed

Not support alpine linux #70

huan opened this issue Nov 1, 2016 · 2 comments

Comments

@huan
Copy link

huan commented Nov 1, 2016

I'm switching my base image from node to alpine for my nodejs project wechaty: wechaty/wechaty#66

after npm install chromedriver in alpine Linux, it can not be run:

bash-4.3# ./node_modules/chromedriver/chromedriver/chromedriver 
bash: ./node_modules/chromedriver/chromedriver/chromedriver: No such file or directory

bash-4.3# ./node_modules/.bin/chromedriver 
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: spawn /wechaty/node_modules/chromedriver/lib/chromedriver/chromedriver ENOENT
    at exports._errnoException (util.js:953:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
    at onErrorNT (internal/child_process.js:348:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at Function.Module.runMain (module.js:577:11)
    at startup (node.js:160:18)
    at node.js:449:3

instead, we can get the right chromedriver by using apk add chromedriver for Alpine Linux

if we use file to show the two version, it seems the reason is that the npm version use libc & and Alpine Linux use musl.

bash-4.3# file /usr/lib/chromium/chromedriver 
/usr/lib/chromium/chromedriver: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, stripped

bash-4.3# file node_modules/chromedriver/chromedriver/chromedriver
node_modules/chromedriver/chromedriver/chromedriver: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.26, BuildID[sha1]=642a90ebc607bac377950226280b021e68fc8e9c, stripped

hope this could be fixed.

@giggio
Copy link
Owner

giggio commented Nov 1, 2016

This package is wrapping the versions available on the original distribution, such as http://chromedriver.storage.googleapis.com/index.html?path=2.25/
Wouldn't apk add chromedriver demand root access? I don't think it is a good idea that this package demands that.
If you can get a mirror to host the binary, you can use the npm option on install, such as npm install chromedriver --chromedriver_cdnurl=http://npm.taobao.org/mirrors/chromedriver, or use the environment variable CHROMEDRIVER_CDNURL. See the readme for more info.
I don't think we can do more to support. If you see a way to evolve using the current code, let me know. I am closing the issue for now, but we can open it later if we find a way forward.

@lock
Copy link

lock bot commented Jul 10, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 10, 2019
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

2 participants