Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommended way of installing on PHP 7.4 #36

Open
joppuyo opened this issue Apr 7, 2020 · 6 comments
Open

Recommended way of installing on PHP 7.4 #36

joppuyo opened this issue Apr 7, 2020 · 6 comments
Labels

Comments

@joppuyo
Copy link

joppuyo commented Apr 7, 2020

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!

@jcupitt
Copy link
Member

jcupitt commented Apr 7, 2020

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.

@joppuyo
Copy link
Author

joppuyo commented Apr 7, 2020

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
Copy link
Author

joppuyo commented Apr 7, 2020

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

@jcupitt
Copy link
Member

jcupitt commented Apr 14, 2021

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.

@jarodium
Copy link

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

@goldmerc
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants