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

ghc-pkg: library "libncursesw.so.6" not found #6092

Closed
Meowcolm024 opened this issue Nov 28, 2020 · 4 comments
Closed

ghc-pkg: library "libncursesw.so.6" not found #6092

Meowcolm024 opened this issue Nov 28, 2020 · 4 comments

Comments

@Meowcolm024
Copy link

Problem description

The unstable package ghc (8.10.1) is installed via apt install, and I have installed llvm beforehand. ghc-pkg doesn't work as expected and throws an exception for missing file.

Steps to reproduce

  1. install ghc using apt install
➜  ~ apt install ghc --fix-missing
  1. run ghc-pkg
➜  ~ ghc-pkg
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/ghc-8.10.1/bin/ghc-pkg": library "libncursesw.so.6" not found: needed by main executable

Expected behavior

For just running ghc-pkg the expected output should be: (On macOS 11.0.1 x86_64, version 8.8.4)

➜  ~ ghc-pkg
ghc-pkg: missing command
For usage information see 'ghc-pkg --help'.

Additional information

The error output

➜  ~ ghc-pkg
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/ghc-8.10.1/bin/ghc-pkg": library "libncursesw.so.6" not found: needed by main executable

Other info:

Device: Oneplus 8 Pro (Snapdragon 865) 
OS: Android 11, Hydrogen OS 11.0.1.1IN11 (NOT rooted)
Termux version: 0.101
@HamzaMateen
Copy link

I just ran into the same issue :(

@vestineo
Copy link

You can do any of the two things. Either

  1. LD_LIBRARY_PATH=$PREFIX/lib/ ghc-pkg
    Or patch elf
  2. patchelf --set-rpath $PREFIX/lib/ $PREFIX/lib/ghc-8.10.1/bin/ghc-pkg

@danwdart
Copy link

ghc seems missing from the unstable repo.

@ghost ghost closed this as completed Sep 14, 2021
@chenyulue
Copy link

chenyulue commented Jan 28, 2022

@vestineo 's first suggestion solved the linking issue.

However, ghc-pkg list gives a segmentation fault, which I don'tn know why happens.

This issue was closed.
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

5 participants