【问题标题】:Install php 7.2 specific version 7.2.0 instead last version from apt安装 php 7.2 特定版本 7.2.0 而不是来自 apt 的最新版本
【发布时间】:2019-05-03 14:27:32
【问题描述】:

我需要安装 PHP 7.2.0。但问题是,当我执行 apt-get install 最新版本 7.2.17:

apt install php7.2-fpm php7.2 php7.2-common php7.2-gmp php7.2-curl php7.2-soap php7.2-bcmath php7.2-intl php7.2-mbstring php7.2-xmlrpc php7.2-mysql php7.2-gd php7.2-xml php7.2-cli php7.2-zip

有安装此特定版本的简单方法吗?

我正在使用 Ubuntu 16 运行 vps

【问题讨论】:

  • 这属于别处 - unix.stackexchange.com 也许。基本上,使用apt-cache madison php7.2 查看您的回购列表中有哪些版本,然后使用apt-get install php7.2=packageversionstring 安装特定版本

标签: ubuntu-16.04 php-7.2


【解决方案1】:

apt-get 对我不起作用。解决方案是从源代码安装 PHP 7.2.0。

# curl -O -L https://github.com/php/php-src/archive/php-7.2.0.tar.gz
# tar -zxvf php-7.2.0.tar.gz 
# cd php-src-php-7.2.0/
# ./configure --prefix=/usr/local/php --enable-fpm --disable-short-tags --with-openssl --with-pcre-regex --with-pcre-jit --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-curl --enable-exif 
--with-gd --enable-intl --enable-mbstring --with-mysqli --enable-pcntl --with-pdo-mysql --enable-soap --enable-sockets --with-xmlrpc --enable-zip --with-webp-dir --with-jpeg-dir --with-png-dir --with-xls --enable-fpm

# make

# make install

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-18
    • 1970-01-01
    • 2023-01-04
    • 2021-11-16
    • 1970-01-01
    相关资源
    最近更新 更多