名称 | 版本 | 下载/安装方式 | 描述 |
---|---|---|---|
Ubuntu | ubuntu 18x64 | 官网下载 | ubuntu 官网 https://ubuntu.com/download/desktop |
perl | 最新版 | apt-get | 脚本解释器,编译openssl用 |
g++ | 最新版 | apt-get | C++编译器 |
make | 最新版 | apt-get | 用于根据Makefile编译,生成elf目标文件 |
automake | 最新版 | apt-get | 用于生成Makefile |
libtool | 最新版 | apt-get | 库文件工具 |
unzip | 最新版 | apt-get | 解压压缩包 |
zlib | zlib-1.2.11.tar.gz | 官网下载 | http://www.zlib.net/ |
openssl | openssl-1.1.1.tar.gz | 官网下载 | https://www.openssl.org/source/ |
libevent | libevent-2.1.12-stable.tar.gz | 官网下载 | https://libevent.org/ |
$ sudo apt-get install perl g++ make automake libtool unzip
$ tar -xvf zlib-1.2.11.tar.gz
$ cd zlib-1.2.11
$ ./configure
$ make
该命令会在zlib主目录下生成.o文件
$ sudo make install
该命令会把库文件(.a/.so, .h)安装到/usr/local/lib和/usr/local/include
目录下;man手册文件安装到/usr/local/share/man/man3
$ tar -xvf openssl-1.1.1.tar.gz
$ cd openssl-1.1.1
$ ./config
$ make
$ sudo make install
$ tar -xvf libevent-2.1.12-stable.tar.gz
$ cd libevent-2.1.12-stable
$ ./autogen.sh
$ ./configure
$ mkdir build && cd build # optional $ cmake .. # optional $ make
$ sudo make install
如果执行"sudo apt-get install"时,出现"Could not get lock /var/lib/dpkg/lock"问题
具体报错:
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
问题原因:apt还在运行
解决方法:
$ ps afx | grep apt ... $ sudo kill -9 pid
$ cd /var/lib/dpkg $ sudo rm lock ... # 一直到所有锁定文件删除
https://www.cnblogs.com/yun6853992/p/9343816.html