0%

Gnutls源码安装小记

源码安装Gnutls

基本流程

根据Gnutls仓库的readme安装

1
2
3
4
5
6
7
8
9
10
11
12
# 安装依赖
apt-get install -y dash git-core autoconf libtool gettext autopoint
apt-get install -y automake python3 nettle-dev libp11-kit-dev libtspi-dev libunistring-dev
apt-get install -y libtasn1-bin libtasn1-6-dev libidn2-0-dev gawk gperf
apt-get install -y libtss2-dev libunbound-dev dns-root-data bison gtk-doc-tools
apt-get install -y texinfo texlive texlive-plain-generic texlive-extra-utils

# 编译安装
./bootstrap
./configure --with-included-libtasn1 --with-included-unistring
sudo make
sudo make install

error

  1. Libnettle x.x was not found (x是一个版本的数字,比如Libnettle 3.6 was not found)

    1
    2
    3
    4
    5
    # 安装nettle(源码安装或者sudo apt安装)
    # 找到pkgconfig文件夹,更新PKG_CONFIG_PATH路径,例如
    export PKG_CONFIG_PATH="/usr/local/lib64/pkgconfig:$PKG_CONFIG_PATH"
    # 重新编译
    ./configure --with-included-libtasn1 --with-included-unistring
  2. nettlex.so not found

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    # 找到nettlex.so的地址,手动设置共享库地址 
    export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH
    # 更新缓存
    echo "/usr/local/lib64" | sudo tee /etc/ld.so.conf.d/local-lib.conf
    sudo ldconfig
    # 重新编译
    sudo make clean
    ./configure --with-included-libtasn1 --with-included-unistring
    sudo make
    sudo make install
  3. ./cha-config.texi:1: node System-wide configuration of the library' lacks menu item for Enabling/Disabling RSAES-PKCS1-v1_5' despite being its Up target

    1
    2
    3
    4
    5
    sudo make clean
    # 禁用文档生成
    ./configure --with-included-libtasn1 --with-included-unistring --disable-doc
    sudo make
    sudo make install
  4. E: 无法定位软件包 texlive-plain-generic

    1
    2
    3
    # 安装其他类似的安装包
    sudo apt-get update
    sudo apt-get install texlive-base
  5. libev4 was not found.

    1
    sudo apt-get install libev4 libev-dev