xiaochina

  Linux,一切皆文件!

linux环境下,编译源码文件步骤总结

01、下载解压

  一遍在开源网站有download/下载页面

02、安装基本编译环境

yum install -y gcc gcc-c++ make automake autoconf    //根据编译软件的特性选择安装 go/git/python.....

03、编译,安装

./configure --help      #查看编译参数选项

./configure --prefix=/data/tengine  -q     #-q quite
make -j 4 -s && make install -j 4 -s        #-j 多线程编译(有的时候不建议) -s silent

04、修改默认库文件搜索路径

/lib
/lib64
/usr/lib
/usr/lib64

/etc/ld.so.conf.d/
tengine.conf
vim tengine.conf
/data/tengine/lib
#通知系统重新搜索库文件(重载库文件)  lddconfig
ldconfig  -v |grep xxxx 

05、添加头文件

默认: /usr/include
ls -s[vf] /data/tengine/include/*  /usr/include/ #或者,建议选择下面的比较好
ls -s /data/tengine/include /usr/include/tegine

06、man文件路径

默认: /usr/share/man
man -M /MAN_DIR COMMAND #不建议,局限性
/etc/man.config添加一条MANPATH
man command #帮助命令

分类:

技术点:

相关文章:

  • 2022-01-09
  • 2021-10-18
  • 2021-08-10
  • 2021-10-14
  • 2021-09-24
  • 2022-01-02
  • 2021-08-12
猜你喜欢
  • 2021-09-04
  • 2021-12-23
  • 2021-12-23
  • 2021-08-13
  • 2021-08-31
  • 2021-10-16
  • 2021-12-23
相关资源
相似解决方案