I would like to run flow in a Docker container. However:
$ docker run -it ubuntu
root@104d066a88b9:/# apt-get install -y unzip wget
root@104d066a88b9:/# wget http://flowtype.org/downloads/flow-linux64-latest.zip
root@104d066a88b9:/# unzip flow-linux64-latest.zip
root@104d066a88b9:/# ./flow/flow
./flow/flow: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory
root@104d066a88b9:/# apt-get install -y libelf-dev
root@104d066a88b9:/# ./flow/flow
Fatal error: exception Not_found
root@104d066a88b9:/# uname -a
Linux 104d066a88b9 3.16.7-tinycore64 #1 SMP Tue Dec 16 23:03:39 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
I've also tried installing through opam and compiling flow from source, always with the same result.
Install works fine on a standard Ubuntu box.
Ideas?
Same here with a debian:jessie docker container.
Some debug information:
% OCAMLRUNPARAM=b flow
Fatal error: exception Not_found
Raised at file "map.ml", line 117, characters 16-25
Called from file "str.ml", line 253, characters 6-29
Found a fix, apparently you need to set USER to something:
That works, well spotted!
Should probably fix Flow and Hack to work without USER being set. Thanks for posting the workaround, @mjibson!
Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.
Just tried to repro this and it seems fixed. Closing out.
This still happens for me in a Docker container using the flow-bin npm package. The command is "flow check".
/opt/buildAgent/work/3c70a0ec877e6008/node_modules/flow-bin/vendor/flow: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory
@touchtech-docker-machine it was the same for me. To solve it I installed libelf1 on debian jessie with
sudo apt-get install libelf1
It's strange that there is no check and warning message during the npm install of flow-bin...
If your image is from node:latest
(which is debian:jessie
under the hood)
you need a little bit more:
apt-get update -qq
apt-get install -qy libelf1
@ababich's Fix worked wonderfully for me.
Installing libelf1 in the container worked for me up to v0.37.4 but doesn't work anymore on v0.38.0.
This worked for me, v0.39, debian jessie based container
Seems to work again.
still having this issue on circleCI 2 :(
@Dakuan I was having this issue on CircleCI 2 as well
after updating to [email protected] and rerunning flow check .
, I had a couple errors
[2017-10-06 16:32:49] File node_modules/node-uuid/lib/sha1-browser.js is malformed
[2017-10-06 16:32:50] File node_modules/weinre/web/client/nls/English.lproj/localizedStrings.js is malformed
which I fixed by updating my .flowconfig
[ignore]
s:
.*/node_modules/node-uuid/lib/.*
.*/node_modules/weinre/web/client/nls/.*
https://github.com/facebook/flow/issues/3870 has some more details. Hope that helps!
Most helpful comment
If your image is from
node:latest
(which isdebian:jessie
under the hood)you need a little bit more:
apt-get update -qq
apt-get install -qy libelf1