brew install php56-imagick: No available formula - homebrew

I'm on OSX High Sierra and trying to install php56-imagick via brew install php56-imagick. This results in:
Error: No available formula with the name "php56-imagick"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
I tried this as read on the internet brew tap Homebrew/homebrew-php but it returns: Error: homebrew/php was deprecated. This tap is now empty as all its formulae were migrated..
Where can I find the formula to install this package?
Thanks,
Kim

php56-imagick and other PHP extensions used to be available in the Homebrew/php tap, but they have been deprecated. The standard way to install PHP extension is to use pecl, for example:
pecl install imagick
Installing Extensions for Specific Version of PHP
The formula php56-imagick assumes you need the extension for PHP 5.6. Add PHP 5.6's installation directory into your PATH so that you are using the correct version of pecl.
$ PATH=/usr/local/opt/php#5.6/bin:/usr/local/opt/php#5.6/sbin:$PATH pecl install imagick
downloading imagick-3.4.3.tgz ...
Starting to download imagick-3.4.3.tgz (245,410 bytes)
...................................................done: 245,410 bytes
19 source files, building
running: phpize
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
...
...
...
Build process completed successfully
Installing '/usr/local/Cellar/php#5.6/5.6.35_1/include/php/ext/imagick/php_imagick_shared.h'
Installing '/usr/local/Cellar/php#5.6/5.6.35_1/pecl/20131226/imagick.so'
install ok: channel://pecl.php.net/imagick-3.4.3
Extension imagick enabled in php.ini
Extension Installation Error
During my extension installation process, I encountered this error
ERROR: failed to mkdir /usr/local/Cellar/php#7.1/7.1.16_1/pecl/20160303
Which is due to the missing /usr/local/lib/php/pecl directory. This might be because I have been using PHP 5.x before the release of PHP 7, hence the newer installation does not create the directory. In any case, creating the directory solved this problem
mkdir /usr/local/lib/php/pecl
Compiled Extension Directory
Note that every version of PHP (installed via Homebrew) is located at /usr/local/lib/php/pecl
$ ls -ld /usr/local/Cellar/php#5.6/5.6.35_1/pecl
lrwxr-xr-x 1 hanxue admin 23 Apr 25 2018 /usr/local/Cellar/php#5.6/5.6.35_1/pecl -> /usr/local/lib/php/pecl
Each PHP version will have their own extension directory
$ ls /usr/local/lib/php/pecl/20131226/
imagick.so
php.ini Extension Configuration
pecl helpfully add the line
extension="imagick.so"
to the top of php.ini, but `extension_dir is unset. Set it to the correct value
extension_dir = "/usr/local/lib/php/pecl/20131226"
Finally, remember to reload or restart your web server!

Related

Error installing Imagick on MacOS Catalina

Trying to get php/imagick working on my mac running OS 10.15.3 (Catalina) using brew.
I installed Php (7.4.3)
I installed imagemagic ( 7.0.9-23)
Then when I pecl install imagick
I get:
545 $ pecl install imagick
downloading imagick-3.4.4.tgz ...
Starting to download imagick-3.4.4.tgz (253,434 bytes)
.....................................................done: 253,434 bytes
ERROR: failed to write /usr/local/pear/docs/imagick/examples/.tmppolygon.php:
copy(/usr/local/pear/docs/imagick/examples/.tmppolygon.php): failed to open stream: Permission denied
The folder exists and is empty and has permissions
drwxrwxr-x 6 root admin 192B Aug 29 08:46 /usr/local/pear/docs/imagick/examples
Frustrating that the installation fails because an example file won't load. The message sounds like it can't read the source but I'm not sure. Anyone have any ideas?
Got it to work by running sudo pecl install instead of just pecl. That got partway, and then encountered missing readline lib which produced a error message about version number. That is fixed by brew upgrade awk. Looks like it all succeeded.

install MongoDB C++ Driver problem in ubuntu 16.04

I want to install MongoDB C++ Driver, so first is mongocxx
I follow this installation:
http://mongocxx.org/mongocxx-v3/installation/
but I can not pass step 4
when I run this in mongo-cxx-driver/build
sudo cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
it shows
-- Auto-configuring bsoncxx to use MNMLSTC for polyfills since C++17 is inactive
CMake Error at src/mongocxx/CMakeLists.txt:37 (find_package):
By not providing "Findlibmongoc-1.0.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"libmongoc-1.0", but CMake did not find one.
Could not find a package configuration file provided by "libmongoc-1.0"
(requested version 1.13.0) with any of the following names:
[![enter image description here][1]][1]
libmongoc-1.0Config.cmake
libmongoc-1.0-config.cmake
Add the installation prefix of "libmongoc-1.0" to CMAKE_PREFIX_PATH or set
"libmongoc-1.0_DIR" to a directory containing one of the above files. If
"libmongoc-1.0" provides a separate development package or SDK, be sure it
has been installed.
second question,
Step 2: Choose a C++17 polyfill how can I set MNMLSTC/core?
does anyone can help me,I already trap here for a long time ?
my env:
mongo-c-driver 1.15.1
libmongoc-1.0
mongocxx-3.4.x
Cmake is complaining about not finding a package configuration file (xxx.cmake), probably because you didn't build libmongoc/libbson.
I've tried to reproduce your issue and hit the same problem when I only installed them (apt-get install), so my suggestion is that you get the sources and build them as described at: http://mongoc.org/libmongoc/current/installing.html
Here's the list of commands (with the latest version of mongo-c-driver=1.15.1) which I just tried and worked fine:
wget https://github.com/mongodb/mongo-c-driver/releases/download/1.15.1/mongo-c-driver-1.15.1.tar.gz
tar xzf mongo-c-driver-1.15.1.tar.gz
cd mongo-c-driver-1.15.1
mkdir cmake-build
cd cmake-build
cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF ..
make
sudo make install
At this point you can go back into mongocxx/build and run again the command you were stuck at:
cd ../../mongo-cxx-driver/build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..

dse-libcassandra-3.1.4-1.noarch conflicts with filesystem-3.2-13.fc19.x86_64

I'm unable to install dse-full or opscenter due to the following transaction errors
Total
Running transaction check
Running transaction test
Transaction check error:
file /usr/bin from install of dse-libcassandra-3.1.4-1.noarch conflicts with file from package filesystem-3.2-13.fc19.x86_64
file /usr/sbin from install of dse-libcassandra-3.1.4-1.noarch conflicts with file from package filesystem-3.2-13.fc19.x86_64
Error Summary
-------------
Is there some yum foo to get around this? Why would the package include a /user/bin and /usr/sbin?
**UPDATE Resolved**
I was able to work around this by doing the following:
Downloaded the latest rpm from the datastax repository using my login credentials:
wget http://xxx:xxx#rpm.datastax.com/enterprise/noarch/dse-libcassandra-3.1.4-1.noarch.rpm
Then ran:
rpm -Uvh --force dse-libcassandra-3.1.4-1.noarch.rpm
I had to do the same thing to get opscenter installed. I believe the rpm's were packaged incorrectly and hope it is resolved in a future release.
**NOTE**
If you use this solution you should also download the filesystem rpm and run:
rpm -Uvh --force filesystem-3.2-13.fc19.x86_64.rpm
This way /usr/bin and /usr/sbin is owned by the filesystem package again. Otherwise you might run into problems later trying to upgrade fedora.
Yes this is an issue in the rpm spec that has been resolved for upcoming releases. Both packages erroneously try to take control over /usr/bin and /usr/sbin.

Unsupported HDF5 version

Trying to install Pytables, and I've installed almost all dependencies:
However, when I'm trying to install pytables:
* Found numpy 1.7.0b1 package installed.
* Found numexpr 2.0.1 package installed.
* Found Cython 0.16 package installed.
* Found HDF5 headers at ``/home/xug/pytables/hdf5/include``, library at ``/home/xug/pytables/hdf5/lib``.
.. ERROR:: Unsupported HDF5 version!
What does "unsupported HDF5 version" mean?
Although the author of the question has answered it in the comment, I think it is appropriate to have the (perhaps a bit more verbose) answer here too.
As mentioned, the problem is caused by a wrong (or lacking) systemwide version of HDF5 libraries. In my case, I solved it by compiling a newer version and installing it locally:
$ wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.11.tar.bz2
$ tar xjvf hdf5-1.8.11.tar.bz2
$ cd hdf5-1.8.11
$ configure --prefix=~/localroot
$ make -j 8
$ make install
It is then necessary to specify the path to this local installation before compiling package:
$ export HDF5_DIR=~/localroot
$ pip install tables
Finally, ~/localroot/lib must be in LD_LIBRARY_PATH for PyTables to work, so I added the line
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/localroot/lib
to ~/.bashrc

Brew linking with ImageMagick

Installing:
ostaptan:~ ostap$ brew install imagemagick --disable-openmp --from-source
==> Downloading http://downloads.sf.net/project/machomebrew/mirror/ImageMagick-6.7.7-6.tar.bz2
Already downloaded: /Library/Caches/Homebrew/imagemagick-6.7.7-6.tar.bz2
==> Patching
patching file configure
Hunk #1 succeeded at 32371 (offset 447 lines).
==> ./configure --disable-osx-universal-binary --without-perl --prefix=/usr/local/Cellar/imagemagick/6.7.7-6 --enable-shared --disable-static
==> make install
Error: The linking step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link imagemagick'
==> Summary
/usr/local/Cellar/imagemagick/6.7.7-6: 1388 files, 32M, built in 61 seconds
linking after bad linking in install:
ostaptan:wand ostap$ brew link imagemagick
Linking /usr/local/Cellar/imagemagick/6.7.7-6...
Error: Could not symlink file: /usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick/wand/wand-view.h
Target /usr/local/include/ImageMagick/wand/wand-view.h already exists. You may need to delete it.
To force the link and delete this file, do:
brew link -f formula_name
To list all files that would be deleted:
brew link -n formula_name
How to link??? what to do?? Can't find answers anywhere!
As suggested in the brew link output, try
brew link -f imagemagick
This should clean up old links in /usr/local/include/ImageMagick/, and then link the files required to complete the installation.
If this doesn't work check that your user has permission to write to /usr/local/include/ImageMagick/*.
After hours and hours of trying the only thing that worked for me was:
sudo brew link --overwrite imagemagick
(Also requires /usr/local/bin/brew to be chowned to root)
Homebrew does not support the overwrite sudo command anymore.
sudo brew link --overwrite imagemagick
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.

Resources