php-vips-ext icon indicating copy to clipboard operation
php-vips-ext copied to clipboard

Recommended way of installing on PHP 7.4

Open joppuyo opened this issue 5 years ago • 6 comments

It seems like PHP 7.4 doesn't include PEAR (and PECL) anymore and they recommend using something called Pickle. However, it doesn't seem to actually work and the repository hasn't been updated in years.

So if I want to install the vips extension on PHP 7.4 what would be the recommended way of doing so? Building from source?

Thanks!

joppuyo avatar Apr 07 '20 12:04 joppuyo

Sorry, I don't know. Does bin/pickle install vips not work?

Yes, you can build from source, but that needs pear. Someone will need to dig into php 7.4 and see how they suggest fixing this.

jcupitt avatar Apr 07 '20 13:04 jcupitt

I get an error about HTTPS connection because Pickle has hardcoded http:// URLs.

In any case, I don't think it's very wise to rely on tool that is clearly not actively maintained.

I think you'd be able to use phpize with php7.4-dev package to manually build the extension.

I'll have to check if it works with a fresh Ubuntu 20.04 image.

joppuyo avatar Apr 07 '20 14:04 joppuyo

I managed to build the extension from source and install it on Ubuntu 20.04 and PHP 7.4. Here are the required commands if anyone else wants to do the same:

sudo apt install php7.4 php7.4-dev php7.4-fpm libvips pkg-config libvips-dev
wget https://github.com/libvips/php-vips-ext/archive/v1.0.10.tar.gz
tar -zxvf v1.0.10.tar.gz 
cd php-vips-ext-1.0.10
phpize
./configure
make
make test
sudo make install

Then just add extension=vips.so to /etc/php/7.4/fpm/php.ini and /etc/php/7.4/cli/php.ini

joppuyo avatar Apr 07 '20 15:04 joppuyo

Hi @jarodium, I'm sorry you're having trouble. Could you open a new issue, please? This one is for php 7.4 install problems.

jcupitt avatar Apr 14 '21 08:04 jcupitt

Hello. I shall drop the comment then post it in a new issue.

jarodium avatar Apr 14 '21 12:04 jarodium

@joppuyo thanks for that. I got it working that way on ubuntu 21.04 with PHP 8.0

My system actually had PECL installed but trying to install with PECL caused an error to do with curly braces being deprecated for accessing array elements and string offsets.

goldmerc avatar Aug 10 '21 12:08 goldmerc