5

I'm trying to install weasyprint on Ubuntu, and am running into the following error with libffi-dev:

sudo apt-get install libffi-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libffi-dev

I'm not sure what I could possibly be doing wrong, however without this I keep failing whenever I try to install weasyprint. Can someone help me out?

Valrok
  • 151

3 Answers3

4

Check this entry in your /etc/apt/sources.list:

deb http://archive.ubuntu.com/ubuntu vivid main restricted universe

Start an update

sudo apt-get update

And install with

sudo apt-get install libffi-dev

The Package is in the main repositories:

% apt-cache policy libffi-dev
libffi-dev:
  Installed: 3.2.1-2
  Candidate: 3.2.1-2
  Version table:
 *** 3.2.1-2 0
        500 http://archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
        100 /var/lib/dpkg/status
A.B.
  • 90,397
2

Addthis entry in your /etc/apt/sources.list if it'snot

deb http://archive.ubuntu.com/ubuntu vivid main restricted universe

update soures list

sudo apt-get update

then try again

sudo apt-get install libffi-dev
Maythux
  • 84,289
0

If you, like me, can't install from the repo because you are on an unsupported version of Ubuntu and can't change ATM, try installing the deb package manually:

https://launchpad.net/ubuntu/+source/libffi

I needed libffi-dev to install a gem, and so I downloaded:

libffi-dev-dbgsym_3.2.1-6_amd64.ddeb (872 bytes)

Installed that, and was able to then bundle install and the gem works.

d3vkit
  • 508