下载代码语言:javascript
复制
wget https://www.php.net/distributions/php-8.3.1.tar.gztar -zxvf php-8.3.1.tar.gz
下载地址:https://www.php.net/downloads 安装依赖包代码语言:javascript
复制
sudo apt-get install libfcgi-dev libfcgi0ldbl libjpeg-turbo8-dev \libmcrypt-dev libssl-dev libc-client2007e \libc-client2007e-dev libxml2-dev libbz2-dev \libcurl4-openssl-dev libjpeg-dev libpng-dev \libfreetype6-dev libkrb5-dev libpq-dev \libxml2-dev libxslt1-dev libzip-dev \libsqlite3-dev libonig-dev pkg-config \libxml2-dev libkrb5-dev libssl-dev \libbz2-dev libpng-dev libfreetype6-dev \libc-client2007e-dev libonig-dev \libreadline-dev libxslt1-dev libzip-dev
如果安装的依赖包不存在,请通过命令:apt-cache search freetype 查找相应的安装包安装即可 编译代码语言:javascript
复制
cd php-8.3.1./configure \--prefix=/usr/local/php-8.3.1 \--with-config-file-path=/usr/local/php-8.3.1/etc \--with-zlib-dir \--with-freetype \--enable-mbstring \--enable-soap \--enable-calendar \--with-curl \--with-zlib \--enable-gd \--disable-rpath \--enable-inline-optimization \--with-bz2 \--with-zlib \--enable-sockets \--enable-sysvsem \--enable-sysvshm \--enable-pcntl \--enable-mbregex \--enable-exif \--enable-bcmath \--with-mhash \--with-zip \--with-pdo-mysql \--with-mysqli \--with-mysql-sock=/var/run/mysqld/mysqld.sock \--with-jpeg \--with-openssl \--with-fpm-user=www \--with-fpm-group=www \--with-libdir=/lib/x86_64-linux-gnu \--enable-ftp \--with-kerberos \--with-gettext \--with-xmlrpc \--with-xsl \--enable-opcache \--enable-intl \--with-pear \--enable-fpm
安装代码语言:javascript
复制
makemake install
|