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

another try:

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

and

$ cat /etc/issue  
Ubuntu 12.04.4 LTS \n \l

What am I supposed to do now?

20

The packages are be called libffi6 and libffi-dev.

Package names can be searched on http://packages.ubuntu.com/


For searching packages use apt-cache search.
Example in your case following can help you:

$ apt-cache search libffi
libffi-dev - Foreign Function Interface library (development files)
libffi6 - Foreign Function Interface library runtime
libffi6-dbg - Foreign Function Interface library runtime (debug symbols)
ffindex-dbg - simple index/database for huge amounts of small files (debug)
libbfio-dbg - Library to provide basic input/output abstraction (debug)
libffindex0 - library for simple index/database for huge amounts of small files
libffindex0-dev - library for simple index/database for huge amounts of small files (development)
libjffi-java - Java Foreign Function Interface
libjffi-jni - Java Foreign Function Interface (JNI library)
  • 1
    @Jan Edited (Improved) your answer by providing apt-cache search. – Pandya Sep 11 '14 at 13:42
  • libffi5 and libffi6 aren't the same thing. For example when downloading and running pypy3 on raspbian, I will still get "error while loading shared libraries: libffi.so.5: cannot open shared object file: No such file or directory" – Ant6n Oct 21 '19 at 2:04
0

You can also try installing the upstream Debian libffi5 package, if another package specifically requires libffi5.

See: https://packages.debian.org/wheezy/libffi5 or the appropriate upstream Debian version for your Ubuntu release.

Download the appropriate Debian package (.deb) for your architecture, and install using dpkg; e.g. dpkg -i libffi5_3.0.10-3+deb7u2_amd64.deb. Then either fix the original install (apt-get -f install), or reinstall the desired package (apt-get install ...).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.