當前位置:首頁 » 編程語言 » centosphp編譯

centosphp編譯

發布時間: 2023-03-13 05:20:17

㈠ centos 自帶安裝了apache和php,現在想單獨編譯安裝php怎麼弄

無法聯網時升級不了的!建議你能上網的時候,用YUM把原來帶的刪除了,然後你找個linux版本的xapmm算了,這個直接就能用了,資料庫什麼的都集成在里邊,比自己安裝省事多了。

㈡ centos編譯安裝php 怎麼安裝jpeg擴展

伺服器跑的的環境主要是Python/Ruby,有時也需要簡單跑跑PHP腳本,所以也安裝了PHP,環境是Nginx+php-fpm,PHP是源碼編譯安裝的,所以是最小化安裝,甚至連mysqli擴展都沒有。今天需要用到GD庫,才發現沒GD庫環境,所以需要安裝這個擴展。對付單個擴展,單獨編譯動態載入是比較方便快捷的。安裝過程也比較繁雜

㈢ CentOS 7編譯安裝PHP 7.4提示No package 'libzip' found或者(libzip >= 0.11)

編譯安裝PHP 7.4提示No package 'libzip' found或者(libzip >= 0.11),原因是libzip沒有安裝或者版本太低,解決方法如下:

安裝完成後,查看是否存在/usr/local/lib/pkgconfig目錄,如果存在,執行如下命令來設置PKG_CONFIG_PATH:

㈣ centos7編譯php出現問題 系統:CENTOS7 64位 PHP版本:7.1.0 APACHE版本:2.4.25 MYSQL版

1、php的編譯問題主要是依賴包沒有提前安裝
2、如果依賴mysql,就先安裝mysql-devel或編譯mysql
3、需要提前安裝的有,不能寫太細,太細會被度娘屏蔽:
yasm-1.3.0.tar.gz
libmcrypt-2.5.8.tar.gz
libvpx-v1.3.0.tar.bz2
tiff-4.0.3.tar.gz
libpng-1.6.16.tar
freetype-2.5.4.tar.gz
jpegsrc.v9a.tar.gz
libgd-2.2.3.tar.gz
t1lib-5.1.2.tar.gz
4、安裝編譯php
5、安裝php後有一些優化包根據需要安裝

㈤ centos安裝apache mysql php用YUM安裝與編譯安裝有什麼區別

YUM安裝:需要連接網路,依賴庫可以自動補全;
編譯安裝:自己下載安裝包,依賴包要自己補

㈥ centos7系統源碼編譯安裝PHP7.3.5版本

新增系統用戶組和用戶:

下載 PHP7.3.5

[root@localhost ~]# mkdir devdir

[root@localhost ~]# cd devdir/

[root@localhost devdir]# wget https://www.php.net/distributions/php-7.3.5.tar.gz

-bash: wget: 未找到命令

[root@localhost devdir]# rpm -qa|grep wget

[root@localhost devdir]# yum -y install wget

[root@localhost devdir]# rpm -qa|grep wget

wget-1.14-18.el7.x86_64

下載PHP7 解壓 編譯

wget -c https://downloads.php.net/~cmb/php-7.3.4.tar.gz

編譯參數解釋

--with-fpm-user=webu --with-fpm-group=webg 添加PHP運行用戶和用戶組

配置信息出錯:

下載gcc軟體編譯器 yum install -y gcc

configure: error: libxml2 not found. Please check your libxml2 installation.

下載libzip-1.5.2.tar.gz

https://libzip.org/download/libzip-1.5.2.tar.gz

解決libzip 和cmake版本問題

重新配置PHP7編譯環境參數

libzip-1.5.2 無法安裝,已經取消了。

提示off_t類型沒有定義 undefind,解決方法:

編譯安裝

測試PHP是否安裝成功

轉載自:https://my.oschina.net/u/4127346/blog/3047778

㈦ centos7編譯php5.4.38時出錯

1. centos7信息

uname -a

Linux dev 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

2. 運行 ./configure 報錯

configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
3. 運行 grep error config.log

cc: error: unrecognized command line option '-V'
cc: fatal error: no input files
cc: error: unrecognized command line option '-qversion'
cc: fatal error: no input files
conftest.c:9:19: fatal error: stdio.h: No such file or directory
configure:4076: error: in `/usr/local/src/php-5.6.19':
configure:4078: error: cannot run C compiled programs.

4. 按照網上說的方法 在configure後面加上了 --host=x86_64 ,報錯
configure: error: in `/usr/local/src/php-5.6.19':
configure: error: C preprocessor "/lib/cpp" fails sanity check
5. config.log中錯誤提示,差好幾個頭文件

cc: error: unrecognized command line option '-V'
cc: fatal error: no input files
cc: error: unrecognized command line option '-qversion'
cc: fatal error: no input files
conftest.c:9:19: fatal error: stdio.h: No such file or directory
configure:4076: error: in `/usr/local/src/php-5.6.19':
configure:4078: error: cannot run C compiled programs.
[root@dev php-5.6.19]# grep error config.log
cc: error: unrecognized command line option '-V'
cc: fatal error: no input files
cc: error: unrecognized command line option '-qversion'
cc: fatal error: no input files
conftest.c:9:19: fatal error: stdio.h: No such file or directory
conftest.c:9:20: fatal error: stdarg.h: No such file or directory
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
cc: error: unrecognized command line option '-qlanglvl=extc89'
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
cc: error: unrecognized command line option '-qlanglvl=ansi'
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
cc: error: unrecognized command line option '-std'
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
<command-line>:0:1: error: missing '(' after predicate
conftest.c:9:20: fatal error: stdarg.h: No such file or directory
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
<command-line>:0:1: error: missing '(' after predicate
conftest.c:9:20: fatal error: stdarg.h: No such file or directory
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
cc: error: unrecognized command line option '-Xc'
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
conftest.c:12:0: fatal error: assert.h: No such file or directory
| Syntax error
conftest.c:12:0: fatal error: assert.h: No such file or directory
| Syntax error
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
configure:4478: error: in `/usr/local/src/php-5.6.19':
configure:4480: error: C preprocessor "/lib/cpp" fails sanity check

6. gcc安裝信息

[root@dev php-5.6.19]# rpm -qa | grep glibc
compat-glibc-headers-2.12-4.el7.centos.x86_64
glibc-utils-2.17-106.el7_2.4.x86_64
glibc-common-2.17-106.el7_2.4.x86_64
glibc-devel-2.17-106.el7_2.4.x86_64
glibc-static-2.17-106.el7_2.4.x86_64
glibc-2.17-106.el7_2.4.x86_64
glibc-headers-2.17-106.el7_2.4.x86_64
compat-glibc-2.12-4.el7.centos.x86_64

[root@dev php-5.6.19]# gcc -v
Using built-in specs.

COLLECT_GCC=gcc

COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)

熱點內容
動態規劃01背包演算法 發布:2024-11-05 22:17:40 瀏覽:849
nasm編譯器如何安裝 發布:2024-11-05 22:01:13 瀏覽:180
登錄密碼在微信的哪裡 發布:2024-11-05 22:00:29 瀏覽:739
c防止反編譯工具 發布:2024-11-05 21:56:14 瀏覽:247
安卓虛擬機怎麼用 發布:2024-11-05 21:52:48 瀏覽:344
php時間搜索 發布:2024-11-05 20:58:36 瀏覽:479
燕山大學編譯原理期末考試題 發布:2024-11-05 20:13:54 瀏覽:528
華為電腦出現臨時伺服器 發布:2024-11-05 20:05:08 瀏覽:408
斗戰神免費挖礦腳本 發布:2024-11-05 19:53:25 瀏覽:665
網吧伺服器分別是什麼 發布:2024-11-05 19:45:32 瀏覽:392