Comments (15)
This one shows more errors at docker build time
FROM alpine:3.10.1
RUN apk add nodejs npm && \
npm install --global --ignore-scripts purescript && \
node /usr/lib/node_modules/purescript/node_modules/purescript-installer/index.js
from npm-installer.
You can use LD_LIBRARY_PATH
, or preferably put the library in one of the directories listed in /etc/ld.so.conf
. See http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
from npm-installer.
from npm-installer.
Thanks for the report. Do you have a minimal Dockerfile which can reproduce this issue?
from npm-installer.
Sure,
Fedora release 30 (Thirty)
Docker version 18.09.7, build 2d0083d
FROM alpine:3.10.1
RUN apk add nodejs npm && \
npm install --global purescript
from npm-installer.
I'm affected by this issue as well on:
- Ubuntu 19.04
- Node 12.13.0
✔Check if a prebuilt 0.13.4 binary is provided for linux (906ms)
✔ Download the prebuilt PureScript binary (943ms)
✖ Verify the prebuilt binary works correctly
/home/marijn/.nvm/versions/node/v12.13.0/lib/node_modules/purescript/purs.bin --version
Error: Command failed: /home/marijn/.nvm/versions/node/v12.13.0/lib/node_modules/purescript/purs.bin --version
/home/marijn/.nvm/versions/node/v12.13.0/lib/node_modules/purescript/purs.bin: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
at ChildProcess.exithandler (child_process.js:295:12)
at ChildProcess.emit (events.js:210:5)
at maybeClose (internal/child_process.js:1021:16)
at Socket.<anonymous> (internal/child_process.js:430:11)
at Socket.emit (events.js:210:5)
at Pipe.<anonymous> (net.js:658:12)
▬ Save the downloaded binary to the npm cache directory
↓ Fallback: building from source
✖ Check if 'stack' command is available
stack --allow-different-user --numeric-version
Error: Command failed with exit code 2 (ENOENT): stack --allow-different-user --numeric-version
spawn stack ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
▬ Download the PureScript 0.13.4 source
▬ Ensure the appropriate GHC is installed
▬ Build a binary from source
▬ Save the built binary to the npm cache directory
from npm-installer.
@marijnz0r that looks like a different issue to me, it seems you're missing the libtinfo
/ ncurses
library. See the note in https://github.com/purescript/purescript/blob/master/INSTALL.md#the-curses-library
from npm-installer.
@hdgarrood thanks for the quick response, it seems it might have to do something with a correct version of libtinfo, check out this issue: purescript/spago#104
Do you have an idea how to fix this?
from npm-installer.
Yes, you need to install the ncurses/libtinfo library, and/or build from source so that GHC can select the appropriate version.
from npm-installer.
The weird thing is, I do have them installed:
locate libtinfo.so
/snap/core/7713/lib/x86_64-linux-gnu/libtinfo.so.5
/snap/core/7713/lib/x86_64-linux-gnu/libtinfo.so.5.9
/snap/core/7917/lib/x86_64-linux-gnu/libtinfo.so.5
/snap/core/7917/lib/x86_64-linux-gnu/libtinfo.so.5.9
/snap/core18/1192/lib/x86_64-linux-gnu/libtinfo.so.5
/snap/core18/1192/lib/x86_64-linux-gnu/libtinfo.so.5.9
/snap/core18/1223/lib/x86_64-linux-gnu/libtinfo.so.5
/snap/core18/1223/lib/x86_64-linux-gnu/libtinfo.so.5.9
/usr/lib/x86_64-linux-gnu/libtinfo.so
/usr/lib/x86_64-linux-gnu/libtinfo.so.6
/usr/lib/x86_64-linux-gnu/libtinfo.so.6.1
How do I point the purescript install script to the correct libtinfo.so.5?
from npm-installer.
This apparently fixed it for me:
sudo ln -s /snap/core/7917/lib/x86_64-linux-gnu/libtinfo.so.5 /usr/lib/x86_64-linux-gnu/libtinfo.so.5
I hope it helps someone.
from npm-installer.
I've dug into this a bit and I think it might be to do with alpine being based on musl rather than glibc or some other difference in how the system is set up. After running those commands, we get an error along the lines of spawn /purs ENOENT
, which would suggest that the problem is that the file /purs
does not exist. In fact the file does exist, which leads me to believe that we are in a similar situation to this person: https://stackoverflow.com/questions/5234088/execve-file-not-found-when-stracing-the-very-same-file, and the ENOENT really means that the dynamic loader for the binary doesn't exist. Indeed, ldd /purs
prints /lib64/ld-linux-x86-64.so.2
as the first line of the output, but no such file that exists in the container. I think you may need to build the compiler from source.
from npm-installer.
The issues reported here are covered by #22 and #24, so I'm going to close this. Thanks for the report!
from npm-installer.
@hdgarrood
(Form the discussion) it is not clear what to do if one wants to install purs on alpine and encounters the error?
Should this be added to https://github.com/purescript/purescript/blob/master/INSTALL.md ?
from npm-installer.
You’ll need to build the compiler yourself from source on alpine, as all of the prebuilt binaries rely on glibc. We do have instructions there for building from source already, but I don’t think we have the bandwidth to maintain instructions for alpine specifically.
from npm-installer.
Related Issues (20)
- Simplify installation HOT 3
- Unable to install purescript HOT 2
- `npm install purescript` stuck HOT 10
- Readme: dead link HOT 1
- Make the installer stable HOT 2
- installation failure (Cannot find module 'psl') HOT 3
- Installing the purescript npm package fails HOT 17
- Improve error message if the `purs` binary's dynamic loader does not exist
- Supply the --nix flag to stack if we appear to be on Nix/NixOS HOT 2
- Include output from `stack` when building from source HOT 1
- purs --version raise error , probably installation issue HOT 11
- Add abitlity to skip binary installation
- Unable to install purescript on Ubuntu 20.04 LTS HOT 6
- install with yarn on void linux musl HOT 5
- NPM Installation Issue HOT 11
- Update package dependencies
- Installer fails in docker HOT 5
- Building from source doesn't seem to work
- Use the new aarch64 releases when applicable HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from npm-installer.