Not able to install php memcache - memcached

When I run brew install php56-memcache I get the following error.
checking whether to enable memcache session handler support... yes
checking for the location of ZLIB... no
checking for the location of zlib... configure: error: memcache support
requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB
include and library are located
I have zlib in brew list.
autoconf jpeg memcached php56 ruby-build
freetype libevent mhash php56-igbinary unixodbc
gettext libmemcached mysql php56-memcached vim
git libpng node pkg-config zlib
icu4c mcrypt openssl rbenv
I tried `bbrew install php56-memcache --with-zlib-dir=/usr/local/Cellar/zlib/1.2.8' but it gives the same error.
I tried a manual way, ./configure, make, make install, but the result is the same.
How can I install memcache?

I run the followings and it is installed.
brew link --force zlib
brew install php56-memcache

This did the trick for me [#1637], just run
xcode-select --install
brew install php{xx}-memcache

Related

cannot link libpq on Mac M1

I've been trying to run the Rust Diesel crate on my Macbook M1 and it doesn't work. The final part of the compilation gets broken by the following error:
= note: ld: warning: ignoring file /usr/local/Cellar/libpq/14.1/lib/libpq.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture arm64:
When I get the info for libpq I get the following:
maxwellflitton#Maxwells-MacBook-Pro vanguard % brew info libpq
libpq: stable 14.1 (bottled) [keg-only]
Postgres C API library
https://www.postgresql.org/docs/14/libpq.html
/usr/local/Cellar/libpq/14.1 (2,335 files, 27.8MB)
Poured from bottle on 2022-01-09 at 00:14:32
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/libpq.rb
License: PostgreSQL
==> Dependencies
Required: krb5 ✔, openssl#1.1 ✔
==> Caveats
libpq is keg-only, which means it was not symlinked into /usr/local,
because conflicts with postgres formula.
If you need to have libpq first in your PATH, run:
echo 'export PATH="/usr/local/opt/libpq/bin:$PATH"' >> ~/.zshrc
For compilers to find libpq you may need to set:
export LDFLAGS="-L/usr/local/opt/libpq/lib"
export CPPFLAGS="-I/usr/local/opt/libpq/include"
I've tried installing with the following command:
RUSTFLAGS='-L /usr/local/Cellar/libpq/14.1/lib' cargo install diesel_cli --no-default-features --features postgres --force
But I still get the same error. Will it just be easier to wipe the whole thing and start again and if so how would I do this? Other people on the internet using the M1 seem to be able to get round the problem with a simple brew install libpq. Never had any issues with my previous intel mac. My ~/.cargo/config.toml has the following configuration:
[target.aarch64-apple-darwin]
rustflags = '-L /usr/local/Cellar/libpq/14.1/lib -L /opt/homebrew/lib'
Surprisingly this worked
brew install postgresql libpq
cargo clean
cargo build
cargo install diesel_cli --no-default-features --features postgres
I think it had to do with installing diesel-cli before installing the necessary dependencies. Cleaning the cargo dependencies and reinstalling worked for me
on my M1 mac, I installed the postgresql client and library with brew:
brew install postgresql libpq
and attempted to install diesel_cli again, this time it worked fine:
cargo install diesel_cli --no-default-features --features postgres
for some reason, simply installing libpq was not enough to install diesel_cli, i had to install the postgres library and the client.
Encountered a similar problem, and the issue was coming from my brew config (I restored my filesystem from my mac Intel) :
❯ brew config
...
macOS: 12.6-x86_64
...
Therefore, brew was downloading packages built for intel processors. I uninstalled and reinstalled brew following their website and now brew config is correct:
❯ brew config
...
macOS: 12.6-arm64
...
Hope this helps!
I have a Mac M1 and installed both postgresql and libpq with brew
I eventually succeeded in installing diesel_cli with these lines in my ~/.cargo/config.toml file
[target.aarch64-apple-darwin]
rustflags = '-L /opt/homebrew/opt/libpq/lib -L /opt/homebrew/lib'
source was https://github.com/diesel-rs/diesel/issues/2605

Tesseract on OSX: dyld: Library not loaded: /usr/local/lib/libtiff.5.dylib

I just installed tesseract locally on my mac and installed Leptonia . Xaamp use as utility server .
I have the following problem , when you launch the command tesseract from terminal all is successful, however, if the launch tesseract command from php script gives me this error :
dyld: Library not loaded: /usr/local/lib/libtiff.5.dylib
Referenced from: /usr/local/opt/leptonica/lib/liblept.4.dylib
Reason: Incompatible library version: liblept.4.dylib requires version 8.0.0 or later, but libtiff.5.dylib provides version 6.0.0
can someone help me? thank you
I have a problem similar, but not the same. You can try this:
brew install tesseract
If you Could not symlink, /usr/local/bin is not writable, use this command:
sudo chown -R $(whoami) /usr/local
After that install the autoconf, automake, and libtool with this command:
brew install autoconf automake libtool
I think you will need use this one as well: brew install leptonica --with-libtiff
Finally use the link command to link all libs: brew link tesseract, brew link automake, brew link libtool, etc...
I hope it helps you.
I did this and it helped me with a similar problem.
https://sourceforge.net/p/vietocr/discussion/833570/thread/e1eec2b14b/#e296
I went to /usr/local/opt/tesseract/lib/. I had libtesseract.5.dylib and created a symlink with following command: sudo ln -s libtesseract.5.dylib libtesseract.4.dylib

Linux: How to install DBD::Pg module?

Postgres DB is already installed. I'm not using system perl I have installed another perl in "/srv/data203806/Migration/CPAN/localperl/bin". When I'm trying to install, It is asking for PATH TO pg_config:
[root1#frmrszvwb023 bin]# ./cpan install DBD::Pg
Reading '/root/.cpan/Metadata'
Database was generated on Fri, 07 Mar 2014 03:53:02 GMT
Running install for module 'DBD::Pg'
Running make for T/TU/TURNSTEP/DBD-Pg-3.0.0.tar.gz
Checksum for /root/.cpan/sources/authors/id/T/TU/TURNSTEP/DBD-Pg-3.0.0.tar.gz ok
CPAN.pm: Building T/TU/TURNSTEP/DBD-Pg-3.0.0.tar.gz
Configuring DBD::Pg 3.0.0
Path to pg_config?
No POSTGRES_HOME defined, cannot find automatically
Warning: No success on command[/srv/data203806/MUXmh-Migration/CPAN/localperl/bin/perl Makefile.PL]
'YAML' not installed, will not store persistent state
TURNSTEP/DBD-Pg-3.0.0.tar.gz
/srv/data203806/MUXmh-Migration/CPAN/localperl/bin/perl Makefile.PL -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
Could not read metadata file. Falling back to other methods to determine prerequisites
Please help me to install DBD::Pg? How to get path to pg_config?
Just ran into this issue, and on Ubuntu 16.04 Xenial the package you're looking for is:
apt-get install libdbd-pg-perl
You have to install libpq-dev, e.g. on Ubuntu:
sudo apt-get install libpq-dev
On CentOS/RH you can fix it by installing perl-DBD-Pg package with yum
sudo yum install perl-DBD-Pg
From the README:
INSTALLATION:
Before installing, please use the "cpansign -v" program to
cryptographically verify that your copy of DBD::Pg is complete and
valid. The program "cpansign" is part of Module::Signature, available
from CPAN.
By default Makefile.PL uses App::Info to find the location of the
PostgreSQL library and include directories. However, if you want to
control it yourself, define the environment variables POSTGRES_INCLUDE
and POSTGRES_LIB, or define just POSTGRES_HOME. Note that if you have
compiled PostgreSQL with SSL support, you must define the POSTGRES_LIB
environment variable and add "-lssl" and "-lcrypto" to it, like this:
export POSTGRES_LIB="/usr/local/pgsql/lib -lssl -lcrypto"
The usual steps to install DBD::Pg:
perl Makefile.PL
make
make test
make install
Do steps 1 to 2 as a normal user, not as root!
If the script cannot find the pg_config information itself, it will
ask you for the path to it. Enter the complete path to the pg_config
file here, including the name of the file itself.
If you want to use a module, read the documentation.
Before installing perl module, you must install client for accessing Postgres DB. I just install server and header files:
sudo apt-get install postgresql
sudo apt-get install libpq-dev
You can try:
locate pg_config
This will show something like:
/usr/pgsql-10/bin/pg_config
/usr/pgsql-10/include/ecpg_config.h
/usr/pgsql-10/include/ecpg_config_x86_64.h
Then run:
POSTGRES_HOME=/usr/pgsql-10 ./cpan install DBD::Pg
UPD
If you still encounter issues with pg_config, you may need to add it to your PATH, e.g.:
export PATH=$PATH:/usr/pgsql-x.x/bin
where x.x is your version, such as /usr/pgsql-9.2./bin.
Fedora 29, plenv, perl v5.18.0
Once I got plenv working, I was able to install DBD::Pg with cpanm using these commands:
sudo dnf install postgresql postgresql-devel
cpanm --quiet --notest DBD::Pg
For ArchLinux (or any Distro using Pacman):
pacman -S perl-dbd-pg
For my Ubuntu 22 worked this:
sudo apt install build-essential
sudo apt install cpanminus
sudo apt-get install -y postgresql-server-dev-all
sudo cpanm DBD::Pg

In Centos 6.4,when configure Emacs

In Centos 6.4,when configure Emacs,it shows:
configure: error: The required function `tputs' was not found in any library.
The following libraries were tried (in order):
libtinfo, libncurses, libterminfo, libtermcap, libcurses
Please try installing whichever of these libraries is most appropriate
for your system, together with its header files.
For example, a libncurses-dev(el) or similar package.
How to fix it,what's the problem in it.
sudo yum install ncurses-devel
then ./configure again
Try to install libncurses-dev with
bash
apt-get install libncurses-dev
I'm on a Debian Wheezy derived distribution (CrunchBang)
Trying to install Emacs 24.5.1
Had to install libncurses5-dev, then run ./configure
$ sudo apt-get install ncurses-devel
...
E: Unable to locate package ncurses-devel
$ sudo apt-get install libncurses5-dev

How can I install XML::LibXML on Ubuntu

Here is the stdout for install:
$sudo cpanm XML::LibXML
--> Working on XML::LibXML
Fetching http://www.cpan.org/authors/id/S/SH/SHLOMIF/XML-LibXML-2.0014.tar.gz ... OK
Configuring XML-LibXML-2.0014 ... N/A
! Configure failed for XML-LibXML-2.0014. See /home/kahmed/.cpanm/build.log for details.
details:
Unpacking XML-LibXML-2.0014.tar.gz
Entering XML-LibXML-2.0014
Checking configure dependencies from META.yml
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.55_02)
Configuring XML-LibXML-2.0014
Running Makefile.PL
enable native perl UTF8
running xml2-config...ok (2.9.0)
Checking for ability to link against xml2...no
Checking for ability to link against libxml2...libxml2, zlib, and/or the Math library (-lm) have not been found.
Try setting LIBS and INC values on the command line
Or get libxml2 from
http://xmlsoft.org/
If you install via RPMs, make sure you also install the -devel
RPMs, as this is where the headers (.h files) are.
Also, you may try to run perl Makefile.PL with the DEBUG=1 parameter
to see the exact reason why the detection of libxml2 installation
failed or why Makefile.PL was not able to compile a test program.
-> N/A
-> FAIL Configure failed for XML-LibXML-2.0014. See /home/kahmed/.cpanm/build.log for details.
i tried installing libxml2 manually, but still getting the same issue.
also, i checked for libxml2-dev:
sudo apt-get install libxml2-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libxml2-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 78 not upgraded.
here is the system info:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Release: 11.04
Codename: natty
uname -a
Linux autobot 2.6.38-8-server #42-Ubuntu SMP Mon Apr 11 03:49:04 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
I think the relevant line is:
Checking for ability to link against libxml2...libxml2, zlib, and/or the Math library (-lm) have not been found.
So, you've covered off libxml. Have you installed the appropriate zlib package? Try:
sudo apt-get install zlib1g-dev
Then try installing XML::LibXML again.
Why do you want to use CPAN for this anyway? It is typically very bad idea to install CPAN packages if you have native packages provided by standard operating system installer.
Ubuntu provides a lot of Perl packages natively, with following naming convention: package name always starts with lib, then Perl package name like XML::LibXML is converted to lower case and :: replaced to dash - (XML::LibXML => xml-libxml), and finally -perl suffix is added. In other words, native package name for XML::LibXML would be libxml-libxml-perl.
So, in your case, you simply run this command and it will pull all necessary dependencies automatically:
sudo apt-get install libxml-libxml-perl
If you don't like this package for any reason you can uninstall it with sudo apt-get remove. If you use CPAN, it is very difficult to uninstall it reliably.
Overlooked the obvious:
sudo apt-get install --reinstall zlibc zlib1g zlib1g-dev
then:
sudo cpanm XML::LibXML
works!
Maybe this is new version. I did:
sudo apt-get install libxml2-dev
After this module builded and installed successfully