No releases available for package "pecl.php.net/imagick" - php

First of all, I'm sorry if I'm posting a duplicated question. I know there are a few threads about installing imagick on an local machine. But I really can't find any way to fix my php installation.
I want to install the imagick extension for PHP 8.0 But when I try to install with the pecl install imagick command I get the following error:
No releases available for package "pecl.php.net/imagick"
install failed
I am developing on a Macbook. Have a freshly installed Laravel Valet installation. Installed my PHP 8.0 (with homebrew, via valet) and tried to execute pecl install imagick.
I have re-installed imagick & pkg-config with brew reinstall imagick & brew reinstall pkg-config. In that order. After that, I still get the same report.
I have ran brew doctor but don't think there is anything useful in there that could help me. Only some broken symlinks and Unbrewed header files. If you want I can upload the full output, but someone needs to help/tell me how to upload such a big snippet. Just putting it in this question without formatting seems like a bit too much.
Possible duplicated that didn't help me so far:
pecl can't find imagick package

For me it solved with sudo pecl install imagick but that might not be the preferred route.

Related

How do I install imagemagick to php on linux homebrew?

I'm trying to set up my linux environment to use PHP for my job. I'll spare you most of the details, but one extension I need is ImageMagick. I'm using Homebrew to help me install stuff. I'm using PHP 7.4. The commands I've run based on what I've read are as follows:
brew install php#7.4
brew install imagemagick
pecl install imagcik
However, when running the last command, I get this error, saying pcre2.h not found:
error image
I've done a lot of googling and haven't been able to find anything that helps with this specific issue. I don't know what I'm doing wrong. Everything is currently done through homebrew, but if it helps my linux distro is OpenSUSE Tumbleweed. Thanks!
Assuming that you did install pcre2 (if you didn't, run the command below and try again).
$ brew install pcre2
If that does not work, the issue is probably that the file exists, but in the wrong spot. A quick Google search shows that creating a symlink can resolve this issue.
$ ln -s <path to package> /home/linuxbrew/.linuxbrew/Cellar/php#7.4/7.4.27/include/php/ext/pcre/pcre2.h
If you're unsure where the package is currently installed. You should be able to find it with this command.
$ brew info pcre2

PECL install with --configureoptions not working - Memcache

Lately, I have been trying to install the pecl memcache PHP extension on OSX Catalina with brew memcached installed and I'm getting the following error every time I try the install process:
configure: error: memcache support requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located
I have tried with pecl install memcache and with pecl install --configureoptions='with-zlib-dir="path"' memcache to no avail. It always gets the same point and it fails.
From what I have reviewed on different topics regarding the installation of the package the issue seems to be with the -D option in the pecl install command, because when I do a manual install from the source code passing the argument --with-zlib-dir=/usr/local/Cellar/zlib/1.2.11 to the ./configure command it works like a charm and installs the package but is now not listed in pecl list installed packages and as so it cannot be uninstalled.
The issue is I need pecl to manage the installation of the package to be able to uninstall it any time when the environment changes from project to protect.
A quick fix for this (found via https://bugs.php.net/bug.php?id=56522) is to use the PHP_ZLIB_DIR variable instead of --with-zlib-dir.
i.e. PHP_ZLIB_DIR=/usr/local/Cellar/zlib/1.2.11 pecl install memcache
I've struggled with the -D option before as well - near as I can tell it's completely broken.

Update/Upgrade PHP MongoDB driver

Im currently running Php MongoDb version 1.2.10 and I'm wanting to update this version to the most recent/stable.
How would one go about doing this? Im assuming it would be via terminal and using pear or pecl command?
Any Help or advice is greatly appreciated :)
Update :
I did the following within terminal to install the latest version
sudo pecl install mongo
Which has installed version 1.5.6. But after restarting my MAMP server the extension is still stating 1.2.10. Is there something I need to change in my php.ini file? I have already added extension=mongo.so
If you ran sudo pecl install mongo, you likely upgraded the driver for the system install of PHP, which is in a different path than MAMP. There should be a pecl binary within the MAMP path (e.g. /Applications/MAMP/bin/php/php5.x.x/bin), which should be run instead. You may find this blog article as helpful walk-through for the process.
sudo pecl upgrade mongodb worked for me today.

PHP pecl inclued: How to compile and install very latest version

The installible versions of the pecl extension 'inclued' apparently are incompatible with the latest versions of PHP (I'm using 5.5.9). A bug report has been filed and a fix with updated sources noted. Through svn, I have downloaded the updated files. How do I compile the very latest sources and install them?
This is on a standard EC2 ubuntu instance.
A little bit more googling found the following:
http://php.net/manual/en/install.pecl.phpize.php
Gives fairly straightforward directions on compiling and installing a pecl extenstion.
The makefile name wasn't quite the same and had to use 'php -i' to find the extension directory. Also, restarted apache. But seems to be installed.

Error installing MongoDb PHP driver with XAMPP on Max OS Lion

I get this error when i try to run following command
sudo pecl install mongo
Error:
...php_mongo.c:22:10: fatal error: 'php.h'
file not found
#include <php.h>
^
1 error generated.
make: *** [php_mongo.lo] Error 1
ERROR: `make' failed
I am new to MAC, please help me to resolve this and get Mongo Working with PHP.
I have installed MacPorts and autoconf
It seems, that you did not install the xampp "Developer Package", required to build additional php extension. You can download the "Developer Package" from:
http://www.apachefriends.org/en/xampp-macosx.html#849
This has already been answered.
Please follow the processes outlined in this answer - Install PECL on Mac OS X 10.6.
I followed the process outlined here http://akrabat.com/php/setting-up-php-mysql-on-os-x-10-7-lion/, referenced by the above Stackoverflow link and the process for install pear, followed by pecl and subsequently -
sudo pecl install mongo
works perfectly on OSX Lion.
You may need to modify the extensions in /etc/php.ini, however, this is explained in the output after you install the php mongo driver.
It took me the whole day to find this answer, I had tried everything, but this worked finally:
sudo C_INCLUDE_PATH=/usr/local/opt/openssl/include /Applications/XAMPP/xamppfiles/bin/pecl install mongodb
I found this article very helpful. Saved a lot of time after I wasted a lot of time to check other links. I did for MAMP and think will work for XAMPP too.
The thing is MAMP does not ship with all PHP sources to compile pecl mongo file and create mongo.so. All what you need is download php for respective version you are using. I was using php version 5.6.10. I checked php.net site that was having 5.6.13 version. I downloaded sources for this version from PhP.net. Executed "sudo pecl install mongo" again and it worked.

Categories