简体   繁体   中英

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. I'm using these parameters in the configure command:

--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).

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. 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.

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?).

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

sudo apt-mark manual yourpackagename

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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