简体   繁体   English

让Ubuntu确认已安装自定义版本的PHP

[英]Make Ubuntu acknowledge that a custom built version of PHP is installed

I'm trying to install PHP from source code on my Ubuntu 12.04 VPS. 我正在尝试从Ubuntu 12.04 VPS上的源代码安装PHP。 I'm using these parameters in the configure command: 我在configure命令中使用以下参数:

--enable-intl
--with-openssl
--without-pear
--with-gd
--with-jpeg-dir=/usr
--with-png-dir=/usr
--with-freetype-dir=/usr
--with-freetype
--enable-exif
--enable-zip
--with-zlib
--with-zlib-dir=/usr
--with-mcrypt=/usr
--with-pdo-sqlite
--enable-soap
--enable-xmlreader
--with-xsl
--enable-ftp
--with-curl=/usr
--with-tidy
--with-xmlrpc
--enable-sysvsem
--enable-sysvshm
--enable-shmop
--with-mysql=mysqlnd
--with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd
--enable-pcntl
--with-readline
--enable-mbstring
--with-curl
--with-pgsql
--with-pdo-pgsql
--with-gettext
--enable-sockets
--with-bz2
--enable-bcmath
--enable-calendar
--with-libdir=lib
--enable-maintainer-zts
--with-gmp
--enable-fpm

Now, this goes all well and good. 现在,一切顺利。 The version works as expected and during the installation I had no trouble. 该版本可以正常工作,在安装过程中我没有遇到任何麻烦。 Now the fun stuff comes. 现在有趣的东西来了。 Whenever I want to install something like mcrypt (for example) I would normally type apt-get install php5-mcrypt but when I do, and take a look at the dependencies I see that PHP5 is still listed as one and will be installed once I hit y (overwriting my own version). 每当我想安装类似mcrypt东西时(例如),我通常会键入apt-get install php5-mcrypt但是当我这样做时,看看依赖项,我发现PHP5仍被列为一个,并且一旦安装就将被安装。按y (覆盖我自己的版本)。

Now the real core of my question is, how do I let Ubuntu know that I already have PHP5 installed so that it does not attempt to install PHP5 as a dependency anymore. 现在,我的问题的真正核心是,如何让Ubuntu知道已经安装了PHP5,这样它就不再尝试将PHP5安装为依赖项。 Do I have to change something in the configure process? 在配置过程中是否需要更改某些内容? Do I have to install PHP5 using the apt-get manner first, remove it manually, and install my own version of PHP after. 我是否必须先使用apt-get方式安装PHP5,然后手动将其删除,然后再安装自己的PHP版本。

It is worth mentioning that I need this custom PHP build to make Pthreads work since there isn't a repo that offers a ZTS version of PHP (yet, please make one, somebody?). 值得一提的是,我需要这种自定义的PHP构建才能使Pthreads正常工作,因为没有回购提供ZTS版本的PHP(但请提供一个,有人吗?)。

您可以标记软件包已手动安装

sudo apt-mark manual yourpackagename

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM