Debian/CentOS chacha20/AEAD依賴安裝

chacha20依賴安裝

#Debian / Ubuntu
sudo apt-get update
sudo apt-get install build-essential -y
sudo apt-get install --no-install-recommends gettext build-essential autoconf libtool libpcre3-dev asciidoc xmlto libev-dev libc-ares-dev automake libmbedtls-dev libsodium-dev

#CentOS / RHEL
sudo yum groupinstall 'Development Tools'
sudo yum install gettext gcc autoconf libtool automake make asciidoc xmlto c-ares-devel libev-devel

export LIBSODIUM_VER=1.0.13
wget https://download.libsodium.org/libsodium/releases/libsodium-$LIBSODIUM_VER.tar.gz
tar xvf libsodium-$LIBSODIUM_VER.tar.gz
pushd libsodium-$LIBSODIUM_VER

./configure --prefix=/usr && make 
sudo make install
popd
sudo ldconfig

如果是CentOS / RHEL,需要

sudo vi /etc/ld.so.conf

添加

/usr/local/lib

然後

sudo ldconfig

libsodium新版版本號可以在https://github.com/jedisct1/libsodium/releases找到。

标签: Linux, Notes