Unable to locate package libffi6
turbotimon opened this issue ยท 9 comments
Problem
The installation page states for Debian and Ubuntu that libffi6 is needed.
However, with the newest stable releases this is most likely libffi7, see #219, #93 and this. libfi6 can not be installed:
$ sudo apt update && sudo apt install libffi6
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://deb.debian.org/debian-security bullseye-security InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
9 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libffi6Solution
Therefore, i recommend to change this on the installation page, so it does not confuse people (like it did me). e.g:
The following distro packages are required: build-essential curl libffi-dev libffi6 or libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5
Additional
Tested with
$ cat /etc/*release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
and
$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.5 LTS"
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
The installation page states for Debian and Ubuntu that libffi6 is needed.
The installation page currently doesn't take distro version into account. It is generated from the following code:
This code would have to be adjusted to consider the distro versions as well when examining the metadata:
patches welcome.
what about the notes, could it be added here?
I think we should fix the code. It sucks.
I agree, but notes would be a quick fix until it is done clean. Sadly I can not contribute as I'm not at that Haskell level at them moment.
@arjunkathuria can you pick this up?
Ah yes, this would need to be fixed. I'll take a look @hasufell, probably by this weekend.
I got caught by this too. The documentation made me look for a solution, but this issue indicated that there would be no problem.
Using Pop!_OS 22.04 LTS and libffi8 is what's installed by default. libffi7 is available in the repos but libffi6 isn't.
ghcup installed with no errors using the bootstrap script.
@arjunkathuria any progress on fixing up the code that produces the dependency information in the installation instructions?
I wish I was further along my Haskell journey to have the skills to help.
Made some time to work on this.
Looked into it and these are the things that need to be done in order to propose a fix for this.
- fix
ghcup-metadatacompile errors with newv0.1.19.4tagmasterbranch forghcuplibrary, when updated from the currentv0.1.19.2 - write
Prettyinstances forVersionRangeandVersionCmptypes here, to pretty print versions and version ranges in docs. - write new code that takes versions and version-ranges into account when generating the docs for dependencies. These are present in the .yaml file, use those, move away from the hard-coded approach here.
a PR should be up for the two repos when done.
PS: Anything to add or do differently here @hasufell ?