'build emacs and gnutls not found
I built emacs26 on Ubuntu16.04, when I executed ./config --prefix=/usr/local/emacs , it showed like this:
configure: error: The following required libraries were not found:
gnutls
Maybe some development libraries/packages are missing?
If you don't want to link with them give
--with-gnutls=no
as options to configure
I tried to solve this problem many times, but failed. Who can help me, thank you very much.
Solution 1:[1]
The error message tells you two ways in which to solve your problem.
- Install the
gnutlsdevelopment package. You can find it by doing:apt-cache search 'libgnutls.*-dev', and then install it withapt-get. - Link without
gnutls, a la./config --prefix=/usr/local/emacs --with-gnutls=no
Solution 2:[2]
The only thing that worked for me was installing pkg-config.
Solution 3:[3]
Fixed on CentOS:
yum install gnutls-devel
Solution 4:[4]
For me on Ubuntu 19.10 it was specifically "libgnutls28-dev", all others didn't work.
Solution 5:[5]
Actually this should not be too hard to fix. You didn't tell us what you have tried.
What happens if you call
./configure --with-gnutls=no
Normally this is one possibility to work around this. Th other way would be to install libgnutls dev package. Just search for libgnutls with
apt-cache search libgnutls
and you should find the package. I am running Ubuntu 18.04 and on my side it is libgnutls28-dev.
Hope this helps.
Solution 6:[6]
This is how I installed gnutls on Ubuntu 16.04:
sudo apt-get install gnutls-bin
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | nega |
| Solution 2 | Derek Montes de Oca |
| Solution 3 | rocksfrow |
| Solution 4 | oxioxi |
| Solution 5 | Toby Speight |
| Solution 6 | user8128167 |
