最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

Linux下的软件安装

工作和技术 crifan 1675浏览 0评论

Linux下的软件安装

Linux下,获得了一个软件的源代码后,最常见的软件安装步骤如下:

1 ./configure (自动配置各种参数、默认特性等)
2 make (编译源代码,生成可执行程序/工具)
3 make install (将生成的工具安装/拷贝到对应的目录,比如/usr/bin,下)
4 make clean (卸载,删除对应的工具)

另外,对于在configure的时候,支持哪些特性设置和参数传递,常见的可以用:

./configure –help

去查看,比如,对于我此处的 lrzsz-0.12.20,就有:

——————————————————————————————————–

[crifan@localhost lrzsz-0.12.20]$ ./configure –help
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
–cache-file=FILE       cache test results in FILE
–help                  print this message
–no-create             do not create output files
–quiet, –silent       do not print `checking…’ messages
–version               print the version of autoconf that created configure
Directory and file names:
–prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
–exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [same as prefix]
–bindir=DIR            user executables in DIR [EPREFIX/bin]
–sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
–libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
–datadir=DIR           read-only architecture-independent data in DIR
                          [PREFIX/share]
–sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
–sharedstatedir=DIR    modifiable architecture-independent data in DIR
                          [PREFIX/com]
–localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
–libdir=DIR            object code libraries in DIR [EPREFIX/lib]
–includedir=DIR        C header files in DIR [PREFIX/include]
–oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
–infodir=DIR           info documentation in DIR [PREFIX/info]
–mandir=DIR            man documentation in DIR [PREFIX/man]
–srcdir=DIR            find the sources in DIR [configure dir or ..]
–program-prefix=PREFIX prepend PREFIX to installed program names
–program-suffix=SUFFIX append SUFFIX to installed program names
–program-transform-name=PROGRAM
                          run sed PROGRAM on installed program names
Host type:
–build=BUILD           configure for building on BUILD [BUILD=HOST]
–host=HOST             configure for HOST [guessed]
–target=TARGET         configure for TARGET [TARGET=HOST]
Features and packages:
–disable-FEATURE       do not include FEATURE (same as –enable-FEATURE=no)
–enable-FEATURE[=ARG] include FEATURE [ARG=yes]
–with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
–without-PACKAGE       do not use PACKAGE (same as –with-PACKAGE=no)
–x-includes=DIR        X include files are in DIR
–x-libraries=DIR       X library files are in DIR
–enable and –with options recognized:
–disable-timesync   exclude support for timesync protocol
–enable-pubdir=/path   include support for a public writeable directory
–disable-mkdir   disable support for creating directories (lrz)
–enable-syslog=FACILITY,{force,default,optional} include syslogsupport
–disable-nls           do not use Native Language Support
–with-included-gettext use the GNU gettext library included here
–with-catgets          use catgets functions if available

——————————————————————————————————–

其中对于想用交叉编译器,比如arm-linux-gcc,去编译用于生产目标开发板上的可执行程序/工具,可以尝试:

./configure –host=arm-linux

不过,很奇怪的是,此处暂时未能生效,寻找原因中。。。。

转载请注明:在路上 » Linux下的软件安装

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
79 queries in 0.168 seconds, using 22.09MB memory