首页 >> Linux >> 内容页

apt快速搭建对应软件的编译环境

Linux中发行版通常不会提供最新版本的软件,编译开源的软件成为必备技能。
但一般软件开发都会使用到其它的包、库。所以在编译前,一般需要先安装好该软件使用到的包、库文件。
使用apt可以快速安装某软件编译过程中,需要的包、库文件。

如需要编译python3

apt build-dep python3

结果:

mokch@pc:~$ sudo apt  build-dep python3
Reading package lists... Done
Picking 'python3-defaults' as source package instead of 'python3'
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  autopoint debhelper dh-autoreconf dh-strip-nondeterminism docutils-common dwz file gettext
  html2text intltool-debian libarchive-zip-perl libdebhelper-perl libfile-stripnondeterminism-perl
  libmagic-mgc libmagic1 libsub-override-perl libtool po-debconf python-babel-localedata
  python3-alabaster python3-babel python3-certifi python3-chardet python3-docutils python3-idna
  python3-imagesize python3-jinja2 python3-markupsafe python3-packaging python3-pygments
  python3-pyparsing python3-requests python3-roman python3-six python3-snowballstemmer
  python3-sphinx python3-tz python3-urllib3 sphinx-common
0 upgraded, 39 newly installed, 0 to remove and 17 not upgraded.
Need to get 13.0 MB of archives.
After this operation, 63.3 MB of additional disk space will be used.
Do you want to continue? [Y/n]