tar 源码编译安装
源码编译 3 把斧
./configure ,make ,make installl
预先安装 gcc/gcc-c++等一些必备的环境
解压 tar
tar -zxvf xxxx
cd xxxx
./configure
./configure 后面可以加 —prefix=/xxx/xxxxx/xxx(安装路径),./configure 的目的就是生成 Makefile
./configure 执行完毕之后,如果不确定是否报错,可以通过 echo $? 来检查,如果输出 0 ,则表示没有任何问题
make -j 4 (指定 4 核心 cpu 编译,速度会快很多,注意要看 自己是几核cpu)
make install
make clean 清除上次make 命令产生的 Makefile 和 objs,可以重新安装
