Configure編譯
Ⅰ configure命令只指定host能進行交叉編譯嗎
可以,'
--build=BUILD'
指定軟體包安裝的系統平台.如果沒有指定,默認值將是'--host'選項的值. 。
'--host=HOST'
指定軟體運行的系統平台.如果沒有指定,將會運行`config.guess'來檢測.
'--target=GARGET'
指定軟體面向(target to)的系統平台.這主要在程序語言工具如編譯器和匯編器上下文中起作用.如果沒有指定,默認將使用'--host'選項的值.
Ⅱ ./configure編譯php時這個問題如何解決
PHP的安裝雖然有時候很簡單,可是如果應用一多,我們安裝起來就很頭痛了!出錯最多的就是安裝PHP擴展的時候了。其實不管是你是Apache類的應用還是Nginx類的,PHP的安裝都不是很簡單,雖然網上有很多configure參數,但是那不一定是適合你的,因為很多都直接關系著你的系統版本和內核。因此要自己親自不斷的調試,才能完全安裝成功。
本文總結了一些常見的configure錯誤信息和解決這些錯誤的經驗。
1、configure: error: No curses/termcap library found
網上有的說法是:–with-named-curses-libs=/usr/lib/libncursesw.so.5
其實是不對的,雖然能解決configure的錯誤,但是make的時候會提示錯誤,正確的做法應該是
centos: yum -y install ncurses-devel
debian: apt-get install libncurses5-dev
2、configure: error: xml2-config not found. Please check your libxml2 installation.
centos: yum -y install libxml2 libxml2-devel
debian: apt-get install libxml2-dev
3、configure: error: Cannot find OpenSSL』s
centos: yum -y install openssl-devel
4、configure: error: libjpeg.(a|so) not found
centos: yum -y install gd
centos: yum -y install gd-devel
debian: apt-get install libjpeg-dev
5、configure: error: libpng.(a|so) not found.
apt-get install libpng12-dev
6、configure: error: cannot find output from lex; giving up
yum -y install flex
7、configure: error: mod_deflate has been requested but can not be built e to prerequisite failures
centos: yum -y install zlib-devel openssl-devel
debian: apt-get install zlib1g-dev
8、configure: error: libxpm.(a|so) not found.
centos: yum -y install libxpm-dev
debian: apt-get install libxpm-dev
9、configure: error: freetype.h not found.
centos: yum install freetype-devel
debian: apt-get install libfreetype6-dev
10、configure: error: …No recognized SSL/TLS toolkit detected
centos: yum -y install libssl-dev
debian: apt-get install libssl-dev
11、Configure: error: Please reinstall the BZip2 distribution
centos: yum install bzip2 bzip2-devel
debian: apt-get install bzip2-devel
12、Configure: error: Please reinstall the libcurl distribution – easy.h should be in /include/curl/
centos: yum install curl curl-devel (For Redhat & Fedora)
# install libcurl4-gnutls-dev (For Ubuntu)
13、Configure: error: Unable to locate gmp.h
centos: yum install gmp-devel
14、Configure: error: Cannot find Mysql header files under /usr. Note that the MySQL client library is not bundled anymore!
yum install mysql-devel (For Redhat & Fedora)
# apt-get install libmysql++-dev (For Ubuntu)
15、Configure: error: Please reinstall the ncurses distribution
Solutions :
centos: yum install ncurses ncurses-devel
16、Checking for unixODBC support… configure: error: ODBC header file 『/usr/include/sqlext.h』 not found!
Solutions :
centos: yum install unixODBC-devel
17、Configure: error: Cannot find pspell
Solutions :
centos: yum install pspell-devel
18、configure: error: mcrypt.h not found. Please reinstall libmcrypt.
Solutions :
yum install libmcrypt libmcrypt-devel (For Redhat & Fedora)
# apt-get install libmcrypt-dev
19、Configure: error: snmp.h not found. Check your SNMP installation.
Solutions :
yum install net-snmp net-snmp-devel
20、開啟LDAP服務還需要
yum -y install openldap-devel openldap-servers openldap-clients
21、configure: error: cannot find output from lex; giving up
centos: yum -y install flex
22、configure: error: mod_deflate has been requested but can not be built e to prerequisite failures
centos: yum -y install zlib-devel openssl-devel
debian: apt-get install zlib1g-dev
Ⅲ linux系統中如何執行「./configure」命令
首先你要下載軟體的源代碼包
然後使用tar
命令打開
例如tar
-zxvf
httpd.2.2.11.tar.gz
然後進入目錄
cd
httpd.2.2.11
此刻就可以編譯了你可以使用./configure
--help查看編譯參數。
例如./configure
--prefix=/usr/local/apache
--enable-so
--enable-ssl
Ⅳ 如何查看Apache的configure編譯參數
`configure』 configures this package to adapt to many kinds of systems.
`configure』 配置這個包來適合多數系統.
Usage: ./configure [OPTION]… [VAR=VALUE]…譽彎
語法: ./configure [選項]… [變數=值]…
To assign environment variables (e.g., CC, CFLAGS…), specify them as VAR=VALUE. See below for descriptions of some of the useful variables.
配置環境變昌虛遲量(例如,CC,CFLAGS),格式為VAR=VALUE. 看下面對這些可用變數的說明.
Defaults for the options are specified in brackets.
選項的默認值括在方括弧之中.
Configuration:
配置:
-h, –help display this help and exit 顯示這個幫助並退出
–help=short display options specific to this package 顯示這個包的詳細選項
–help=recursive display the short help of all the included packages 顯示所有包括的包的幫助信息
-V, –version display version information and exit 顯示版本信息並退出
-q, –quiet, –silent do not print `checking…』 messages 不列印』檢查』信息
–cache-file=FILE cache test results in FILE [disabled] 存儲測試信息到文件中 [disabled]
-C, –config-cache alias for `–cache-file=config.cache』 `–cache-file=config.cache』的別名
-n, –no-create do not create output files 不生成輸出文件
–srcdir=DIR find the sources in DIR [configure dir or `..'] 在DIR查找代碼
Installation directories:
安裝目錄:
–prefix=PREFIX install architecture-independent files in PREFIX 安裝路徑
[/usr/local/apache2]
–exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 執行文件安裝路徑
[PREFIX]
By default, `make install』 will install all the files in `/usr/local/apache2/bin』, `/usr/local/apache2/lib』 etc. You can specify an installation prefix other than `/usr/local/apache2′ using `–prefix』,for instance `–prefix=$HOME』.
默認情況下,』make install』安裝所有的文件在 `/usr/local/apache2/bin』, `/usr/local/apache2/lib』 等等.你可以指定一個安裝前綴 『–prefix』選項來改變耐李安裝位置,例如 `–prefix=$HOME』.
For better control, use the options below.
更詳細的配置,使用下面的選項.
Fine tuning of the installation directories:
調整安裝目錄的選項:
–bindir=DIR user executables [EPREFIX/bin]
–sbindir=DIR system admin executables [EPREFIX/sbin]
–libexecdir=DIR program executables [EPREFIX/libexec]
–sysconfdir=DIR read-only single-machine data [PREFIX/etc]
–sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
–localstatedir=DIR modifiable single-machine data [PREFIX/var]
–libdir=DIR object code libraries [EPREFIX/lib]
–includedir=DIR C header files [PREFIX/include]
–oldincludedir=DIR C header files for non-gcc [/usr/include]
–datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
–datadir=DIR read-only architecture-independent data [DATAROOTDIR]
–infodir=DIR info documentation [DATAROOTDIR/info]
–localedir=DIR locale-dependent data [DATAROOTDIR/locale]
–mandir=DIR man documentation [DATAROOTDIR/man]
–docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
–htmldir=DIR html documentation [DOCDIR]
–dvidir=DIR dvi documentation [DOCDIR]
–pdfdir=DIR pdf documentation [DOCDIR]
–psdir=DIR ps documentation [DOCDIR]
System types:
系統類型:
–build=BUILD configure for building on BUILD [guessed]
–host=HOST cross-compile to build programs to run on HOST [BUILD]
–target=TARGET configure for building compilers for TARGET [HOST]
Optional Features:
可選的功能:
–disable-FEATURE do not include FEATURE (same as –enable-FEATURE=no)
–enable-FEATURE[=ARG] include FEATURE [ARG=yes]
–enable-layout=LAYOUT
–enable-v4-mapped Allow IPv6 sockets to handle IPv4 connections
–enable-exception-hook Enable fatal exception hook
–enable-maintainer-mode
Turn on debugging and compile time warnings
–enable-pie Build httpd as a Position Independent Executable
–enable-moles=MODULE-LIST
Space-separated list of moles to enable | 「all」 |
「most」
–enable-mods-shared=MODULE-LIST
Space-separated list of shared moles to enable |
「all」 | 「most」
–disable-authn-file file-based authentication control
–enable-authn-dbm DBM-based authentication control
–enable-authn-anon anonymous user authentication control
–enable-authn-dbd SQL-based authentication control
–disable-authn-default authentication backstopper
–enable-authn-alias auth provider alias
–disable-authz-host host-based authorization control
–disable-authz-groupfile
『require group』 authorization control
–disable-authz-user 『require user』 authorization control
–enable-authz-dbm DBM-based authorization control
–enable-authz-owner 『require file-owner』 authorization control
–enable-authnz-ldap LDAP based authentication
–disable-authz-default authorization control backstopper
–disable-auth-basic basic authentication
–enable-auth-digest RFC2617 Digest authentication
–enable-isapi isapi extension support
–enable-file-cache File cache
–enable-cache dynamic file caching
–enable-disk-cache disk caching mole
–enable-mem-cache memory caching mole
–enable-dbd Apache DBD Framework
–enable-bucketeer buckets manipulation filter
–enable-mpio I/O mp filter
–enable-echo ECHO server
–enable-example example and demo mole
–enable-case-filter example uppercase conversion filter
–enable-case-filter-in example uppercase conversion input filter
–enable-ext-filter external filter mole
–disable-include Server Side Includes
–disable-filter Smart Filtering
–disable-charset-lite character set translation
–enable-charset-lite character set translation
–enable-deflate Deflate transfer encoding support
–enable-ldap LDAP caching and connection pooling services
–disable-log-config logging configuration
–enable-log-forensic forensic logging
–enable-logio input and output logging
–disable-env clearing/setting of ENV vars
–enable-mime-magic automagically determining MIME type
–enable-cern-meta CERN-type meta files
–enable-expires Expires header control
–enable-headers HTTP header control
–enable-ident RFC 1413 identity check
–enable-usertrack user-session tracking
–enable-unique-id per-request unique ids
–disable-setenvif basing ENV vars on headers
–enable-version determining httpd version in config files
–enable-proxy Apache proxy mole
–enable-proxy-connect Apache proxy CONNECT mole
–enable-proxy-ftp Apache proxy FTP mole
–enable-proxy-http Apache proxy HTTP mole
–enable-proxy-ajp Apache proxy AJP mole
–enable-proxy-balancer Apache proxy BALANCER mole
–enable-ssl SSL/TLS support (mod_ssl)
–enable-distcache Select distcache support in mod_ssl
–enable-optional-hook-export
example optional hook exporter
–enable-optional-hook-import
example optional hook importer
–enable-optional-fn-import
example optional function importer
–enable-optional-fn-export
example optional function exporter
–enable-static-support Build a statically linked version of the support
binaries
–enable-static-htpasswd
Build a statically linked version of htpasswd
–enable-static-htdigest
Build a statically linked version of htdigest
–enable-static-rotatelogs
Build a statically linked version of rotatelogs
–enable-static-logresolve
Build a statically linked version of logresolve
–enable-static-htdbm Build a statically linked version of htdbm
–enable-static-ab Build a statically linked version of ab
–enable-static-checkgid
Build a statically linked version of checkgid
–enable-static-htcacheclean
Build a statically linked version of htcacheclean
–enable-static-httxt2dbm
Build a statically linked version of httxt2dbm
–enable-http HTTP protocol handling
–disable-mime mapping of file-extension to MIME
–enable-dav WebDAV protocol handling
–disable-status process/thread monitoring
–disable-autoindex directory listing
–disable-asis as-is filetypes
–enable-info server information
–enable-suexec set uid and gid for spawned processes
–disable-cgid CGI scripts
–enable-cgi CGI scripts
–disable-cgi CGI scripts
–enable-cgid CGI scripts
–enable-dav-fs DAV provider for the filesystem
–enable-dav-lock DAV provider for generic locking
–enable-vhost-alias mass virtual hosting mole
–disable-negotiation content negotiation
–disable-dir directory request handling
–enable-imagemap server-side imagemaps
–disable-actions Action triggering on requests
–enable-speling correct common URL misspellings
–disable-userdir mapping of requests to user-specific directories
–disable-alias mapping of requests to different filesystem parts
–enable-rewrite rule based URL manipulation
–enable-so DSO capability
Some influential environment variables:
一些有影響的環境變數:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
Ⅳ linux下編譯ffmpeg時關於configure的問題.
你准備工作沒做好吧!!
先編譯安裝Yasm。
然後編譯安裝H.264 (也就是x264)。
再編譯安裝AAC audio encoder (fdk-aac)。
編譯安裝libmp3lame (MP3 audio encoder)。
編譯安裝libopus (Opus audio decoder and encoder)。
編譯安裝libvpx (VP8/VP9 video encoder and decoder)。
做後編譯安裝ffmpeg。
其中1-6你可以選擇編譯安裝,也可以使用源直接安裝。安裝後了再編譯安裝ffmpeg
你使用 sudo ldconfig -p |grep libx264 看看你的libx264是否正確安裝.
你編譯安裝x264的時候可以使用2中方式都安裝。
先
cd ../x264
./configure --enable-shared
make
make install
最後
cd ../x264
make distclean
./configure --enable-static
make
make install