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

Cannot install on Linux Mint: "posix_spawnp: permission denied" #83

Open
alexeymuranov opened this issue Jan 2, 2023 · 2 comments
Open

Comments

@alexeymuranov
Copy link

I installed Stack on Linux Mint with

$ sudo apt install haskell-stack

Then I tried installing some package and got ExitFailure 1 caused by clock dependency. I tried to install just clock and got:

clock> hsc2hs: .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.6.3.0/build/System/Clock_hsc_make: createProcess: posix_spawnp: permission denied (Permission denied)

Full output:

$ stack install clock
Writing implicit global project config file to: /home/alexey/.stack/global-project/stack.yaml
Note: You can change the snapshot via the resolver field there.
Using latest snapshot resolver: lts-20.5
Stack has not been tested with GHC versions above 8.10, and using 9.2.5, this may fail
Preparing to install GHC (tinfo6) to an isolated location.
This will not interfere with any system-level installation.
Downloaded ghc-tinfo6-9.2.5.                                      
Unpacking GHC into /home/alexey/.stack/programs/x86_64-linux/ghc-tinfo6-9.2.5.te                                                                                Installed GHC.     
Stack has not been tested with Cabal versions above 3.2, but version 3.6.3.0 was found, this may fail
[1 of 2] Compiling Main             ( /home/alexey/.stack/setup-exe-src/setup-mPHDZzAJ.hs, /home/alexey/.stack/setup-exe-src/setup-mPHDZzAJ.o )
[2 of 2] Compiling StackSetupShim   ( /home/alexey/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /home/alexey/.stack/setup-exe-src/setup-shim-mPHDZzAJ.o )
Linking /home/alexey/.stack/setup-exe-cache/x86_64-linux-tinfo6/tmp-Cabal-simple_mPHDZzAJ_3.6.3.0_ghc-9.2.5 ...
clock> configure
clock> Configuring clock-0.8.3...
clock> build
clock> Preprocessing library for clock-0.8.3..
clock> hsc2hs: .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.6.3.0/build/System/Clock_hsc_make: createProcess: posix_spawnp: permission denied (Permission denied)

--  While building package clock-0.8.3 using:
      /home/alexey/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.6.3.0_ghc-9.2.5 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.6.3.0 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1

I also tried GHCup with the same result.

@alexeymuranov alexeymuranov changed the title Cannot install on Linux Mint: "permission denied" Cannot install on Linux Mint: "posix_spawnp: permission denied" Jan 2, 2023
@CetinSert
Copy link
Member

CetinSert commented Jan 3, 2023

I have feeling this might be a wider problem and not just affecting clock. I will search the internet and add what I find here.

@geekosaur
Copy link

geekosaur commented Apr 10, 2023

FWIW we just ran into this helping someone in #haskell, and the cause was /tmp was mounted noexec so hsc2hs couldn't run its self-generated script to use gcc to dump definitions of structs. hsc2hs obeys $TMPDIR so that can be used as a workaround.

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