pg_config not found in path with brew - macos

I am trying to install gdal with brew on OSX Mavericks. However, I get the following error:
brew install gdal
==> Installing dependencies for gdal: liblwgeom, libspatialite
==> Installing gdal dependency: liblwgeom
==> Downloading http://download.osgeo.org/postgis/source/postgis-2.1.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/liblwgeom-2.1.1.tar.gz
==> Downloading https://gist.github.com/dakcarto/7458788/raw/8df39204eef5a1e5671828ded7f377ad
Already downloaded: /Library/Caches/Homebrew/liblwgeom--patch-3d93c9ede79439f1c683a604f9d906f5c788c690.diff
==> Patching
patching file configure.ac
==> ./autogen.sh
==> ./configure --disable-nls --with-projdir=/usr/local --with-jsondir=/usr/local/opt/json-c
checking for iconv_open in -liconv... yes
checking for iconvctl... no
checking for libiconvctl... no
checking for pg_config... no
configure: error: could not find pg_config within the current path. You may need to try re-running configure with a --with-pg_config parameter.
READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
I tried to install it again with:
brew install gdal --with-pg-config='/usr/local/bin/pg_config'
but I get the same error:
brew install gdal --with-pg-config='/usr/local/bin/pg_config'
==> Installing dependencies for gdal: liblwgeom, libspatialite
==> Installing gdal dependency: liblwgeom
==> Downloading http://download.osgeo.org/postgis/source/postgis-2.1.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/liblwgeom-2.1.1.tar.gz
==> Downloading https://gist.github.com/dakcarto/7458788/raw/8df39204eef5a1e5671828ded7f377ad
Already downloaded: /Library/Caches/Homebrew/liblwgeom--patch-3d93c9ede79439f1c683a604f9d906f5c788c690.diff
==> Patching
patching file configure.ac
==> ./autogen.sh
==> ./configure --disable-nls --with-projdir=/usr/local --with-jsondir=/usr/local/opt/json-c
checking for iconv_open in -liconv... yes
checking for iconvctl... no
checking for libiconvctl... no
checking for pg_config... no
configure: error: could not find pg_config within the current path. You may need to try re-running configure with a --with-pg_config parameter.
READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
Both postgres and postgresql have been installed successfully.

Related

can't install mariadb because of Cannot link cmake

I'm sorry if my question is a little newbie, i just get Mac in my job and I'm usually a Linux user...
I'm trying to install mariadb to use it after with python, i tried with brew. I know it's old version of macOS (and i can't do anything about it)
brew install mariadb
Running `brew update --auto-update`...
Warning: You are using macOS 10.14.
We (and Apple) do not provide support for this old version.
It is expected behaviour that some formulae will fail to build in this old version.
It is expected behaviour that Homebrew will be buggy and slow.
Do not create any issues about this on Homebrew's GitHub repositories.
Do not create any issues even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from MacHomebrew on Twitter.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.
==> Fetching dependencies for mariadb: cmake, fmt, mecab, mecab-ipadic, msgpack, ca-certificates, openssl#1.1, pcre, groonga, pcre2, xz and zstd
==> Fetching cmake
==> Downloading https://github.com/Kitware/CMake/releases/download/v3.25.2/cmake-3.25.2.tar.gz
Already downloaded: /Users/cea/Library/Caches/Homebrew/downloads/b19b531ca705f5d1736fb10a83767e06ac2e8801a3f9f34ac8b4bd6e1697dda2--cmake-3.25.2.tar.gz
==> Fetching fmt
==> Downloading https://github.com/fmtlib/fmt/archive/9.1.0.tar.gz
Already downloaded: /Users/cea/Library/Caches/Homebrew/downloads/d39fe7ae376a7198a34490e5acb665b0112ea585720eb917c496bb050bc76c62--fmt-9.1.0.tar.gz
==> Fetching mecab
==> Downloading https://ghcr.io/v2/homebrew/core/mecab/manifests/0.996-3
Already downloaded: /Users/cea/Library/Caches/Homebrew/downloads/21431e68751945bd7900be15e222a38b4402841088e6d5669b4f48c56dc614b3--mecab-0.996-3.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/mecab/blobs/sha256:ef261d203140305ca8c9e4b7311c61176a17325df9454610d3eb33a312c4d3c5
Already downloaded: /Users/cea/Library/Caches/Homebrew/downloads/45441007488c38750c14c63895eccd562a5af40519f48eed3e35ce6eb10fbb13--mecab--0.996.mojave.bottle.3.tar.gz
==> Fetching mecab-ipadic
==> Downloading https://ghcr.io/v2/homebrew/core/mecab-ipadic/manifests/2.7.0-20070801
Already downloaded: /Users/cea/Library/Caches/Homebrew/downloads/011316e018929eb52aa0a17e2d6634fe3804c07bf44859f3cc7a0b4baf0e3cea--mecab-ipadic-2.7.0-20070801.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/mecab-ipadic/blobs/sha256:30967b4167d34f05c79f185d71a40198fff4067d0cce82aed59383548c898681
Already downloaded: /Users/cea/Library/Caches/Homebrew/downloads/f5097a021ff29918177e2d4279101124910e2f287932a3619641988e92f66a76--mecab-ipadic--2.7.0-20070801.mojave.bottle.tar.gz
==> Fetching msgpack
==> Downloading https://github.com/msgpack/msgpack-c/releases/download/c-5.0.0/msgpack-c-5.0.0.tar.gz
Already downloaded: /Users/cea/Library/Caches/Homebrew/downloads/c58619083eaba272e9c477c3c0deb886dc539140f009dd42dc2634e8db0378a3--msgpack-c-5.0.0.tar.gz
==> Fetching ca-certificates
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/manifests/2023-01-10
Already downloaded: /Users/cea/Library/Caches/Homebrew/downloads/927414ed081d996b84d938be6af4d2639403b4d2bee3cc29268d0844999da180--ca-certificates-2023-01-10.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/blobs/sha256:11fe9d0a98a2ac454fa1db95762a697c3340f46560ff27e5e9db8fdeb003f17e
Already downloaded: /Users/cea/Library/Caches/Homebrew/downloads/ca2448928ab98c455b5e46d4a6604247a151ab0f4e60553dbb5c6aecd2e1df3c--ca-certificates--2023-01-10.all.bottle.tar.gz
==> Fetching openssl#1.1
==> Downloading https://www.openssl.org/source/openssl-1.1.1t.tar.gz
Already downloaded: /Users/cea/Library/Caches/Homebrew/downloads/ec3feb171aa63b32c30a6e7423e78f743f92d1ef984b66b0ea548d08220c0ce6--openssl-1.1.1t.tar.gz
==> Fetching pcre
==> Downloading https://ghcr.io/v2/homebrew/core/pcre/manifests/8.45
Already downloaded: /Users/cea/Library/Caches/Homebrew/downloads/4a3bba0e8d1899c13ac3442d2c49df6c1999948bdc0943f2f179693257d82545--pcre-8.45.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/pcre/blobs/sha256:a42b79956773d18c4ac337868cfc15fadadf5e779d65c12ffd6f8fd379b5514c
Already downloaded: /Users/cea/Library/Caches/Homebrew/downloads/456b31dd91116840800d9cc2f35c6f2ebde8cfe8513e6d08dd6974f3309dc4f9--pcre--8.45.mojave.bottle.tar.gz
==> Fetching groonga
==> Downloading https://packages.groonga.org/source/groonga-normalizer-mysql/groonga-normalizer-mysql-1.2.1.tar.gz
Already downloaded: /Users/cea/Library/Caches/Homebrew/downloads/8bc84be3a691a3cf950cf2576dac8b64884fd7f4f91026475399827c9d96fd6b--groonga-normalizer-mysql-1.2.1.tar.gz
==> Downloading https://packages.groonga.org/source/groonga/groonga-13.0.0.tar.gz
Already downloaded: /Users/cea/Library/Caches/Homebrew/downloads/31a0c28bde3252bed7d10bba33dec5ef45e6a5379da383e40c28f668bb03878d--groonga-13.0.0.tar.gz
==> Fetching pcre2
==> Downloading https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.tar.bz2
Already downloaded: /Users/cea/Library/Caches/Homebrew/downloads/7f4d74ac3e447b9fed53bce4202af3921ffc5ae1469894e7e1b10bda2145a15b--pcre2-10.42.tar.bz2
==> Fetching xz
==> Downloading https://downloads.sourceforge.net/project/lzmautils/xz-5.4.1.tar.gz
Already downloaded: /Users/cea/Library/Caches/Homebrew/downloads/ca0c062e8ecb14160415874ad277c80d73d9a9d00aa926ff11a32e877f6651fe--xz-5.4.1.tar.gz
==> Fetching zstd
==> Downloading https://github.com/facebook/zstd/archive/v1.5.4.tar.gz
Already downloaded: /Users/cea/Library/Caches/Homebrew/downloads/a7632ef95a5b612da27d37abb163299230d9f9394c53a8385de8c57a366c2ebe--zstd-1.5.4.tar.gz
==> Fetching mariadb
==> Downloading https://downloads.mariadb.com/MariaDB/mariadb-10.10.3/source/mariadb-10.10.3.tar.gz
Already downloaded: /Users/cea/Library/Caches/Homebrew/downloads/182c68feeae25618d12662bea09676695697b3545a81c63d59850e574372c312--mariadb-10.10.3.tar.gz
==> Installing dependencies for mariadb: cmake, fmt, mecab, mecab-ipadic, msgpack, ca-certificates, openssl#1.1, pcre, groonga, pcre2, xz and zstd
Error: Cannot link cmake
Another version is already linked: /usr/local/Cellar/cmake/3.24.2
i tried to upgrade cmake in case of but i wasn't a better try:
==> Upgrading 1 outdated package:
cmake 3.24.2 -> 3.25.2
==> Fetching cmake
==> Downloading https://github.com/Kitware/CMake/releases/download/v3.25.2/cmake-3.25.2.tar.gz
Already downloaded: /Users/cea/Library/Caches/Homebrew/downloads/b19b531ca705f5d1736fb10a83767e06ac2e8801a3f9f34ac8b4bd6e1697dda2--cmake-3.25.2.tar.gz
==> Upgrading cmake
3.24.2 -> 3.25.2
Error: Permission denied # apply2files - /usr/local/share/emacs/site-lisp/cmake
if someone has any solutions for me thanks!

I cannot get solidity installed with homebrew on macOS Sierra. Installation hangs at boost

I have tried to install solidity on my Mac with
brew update
brew upgrade
brew tap ethereum/ethereum
brew install solidity
brew linkapps solidity
as suggested at solidity#binary-packages. But when I try to brew install solidity the installation process gets stuck right here when installing boost:
bash-3.2$ brew install solidity
==> Installing solidity from ethereum/ethereum
==> Installing dependencies for ethereum/ethereum/solidity: boost, cryptopp, gmp
==> Installing ethereum/ethereum/solidity dependency: boost
==> Using the sandbox
==> Downloading https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.tar.bz2
Already downloaded: /Users/Me/Library/Caches/Homebrew/boost-1.64.0.tar.bz2
==> Downloading https://github.com/boostorg/mpi/commit/f5bdcc1.patch
Already downloaded: /Users/Me/Library/Caches/Homebrew/boost--patch-c7af75a83fef90fdb9858bc988d64ca569ae8d940396b9bc60a57d63fca2587b.patch
==> Downloading https://github.com/boostorg/serialization/commit/1d86261.diff
Already downloaded: /Users/Me/Library/Caches/Homebrew/boost--patch-155f603a00975a1702808be072c1420964feac8323de39c111a9d3a363a4ed9a.diff
==> Patching
==> Applying f5bdcc1.patch
patching file boost/mpi/detail/mpi_datatype_primitive.hpp
patching file boost/mpi/detail/packed_iprimitive.hpp
patching file boost/mpi/detail/packed_oprimitive.hpp
Hunk #2 succeeded at 97 (offset -5 lines).
==> Applying 1d86261.diff
patching file boost/serialization/array.hpp
==> ./bootstrap.sh --prefix=/usr/local/Cellar/boost/1.64.0_1 --libdir=/usr/local/Cellar/boost/1.64.0_1/lib --without-icu --without-libraries=python,mp
==> ./b2 headers
==> ./b2 --prefix=/usr/local/Cellar/boost/1.64.0_1 --libdir=/usr/local/Cellar/boost/1.64.0_1/lib -d2 -j4 --layout=tagged --user-config=user-config.jam
I did find this brew hanging thread and tried to fix everything brew doctor gave me and I have the latest command line tools installed. I could not get it to work yet. Any ideas?
JK! Wow. I guess one of the manny things I tried must have worked. Now it still takes a very very long time but eventually it came to:
🍺 /usr/local/Cellar/boost/1.64.0_1: 12,630 files, 404.4MB, built in 17 minutes 38 seconds
17minutes. Wow.

Brew Install Ruby-Build fails with: cannot run C compiled programs

i'm trying to install ruby using Homebrew, but every time i try I get this:
==> Installing dependencies for ruby-build: pkg-config, makedepend, opens
==> Installing ruby-build dependency: pkg-config
==> Downloading http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz
Already downloaded: /Library/Caches/Homebrew/pkg-config-0.28.tar.gz
==> ./configure --prefix=/usr/local/Cellar/pkg-config/0.28 --disable-host-tool -
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/private/tmp/pkg-config20150616-3766-1f5xqh9/pkg-config-0.28':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
What should I do?
if you install xcode-beta,you should run commond like this:
sudo xcode-select -switch /Applications/Xcode-beta.app/Contents/Developer
Try running this command : xcode-select --install. it works for me

Homebrew: dpkg is not configured to install software

After running brew install dpkg, dpkg is successfully installed; but, like homebrew says below, cannot install or uninstall any software.
==> Caveats
This installation of dpkg is not configured to install software, so
commands such as `dpkg -i`, `dpkg --configure` will fail.
Full installation output:
MacBook-Air:~ james$ brew install dpkg
==> Installing dependencies for dpkg: gnu-tar, xz
==> Installing dpkg dependency: gnu-tar
==> Downloading https://homebrew.bintray.com/bottles/gnu-tar-1.28.yosemite.bottle.2.tar.gz
######################################################################## 100.0%
==> Pouring gnu-tar-1.28.yosemite.bottle.2.tar.gz
==> Caveats
gnu-tar has been installed as "gtar".
If you really need to use it as "tar", you can add a "gnubin" directory
to your PATH from your bashrc like:
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"
==> Summary
🍺 /usr/local/Cellar/gnu-tar/1.28: 13 files, 1.6M
==> Installing dpkg dependency: xz
==> Downloading https://homebrew.bintray.com/bottles/xz-5.2.1.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring xz-5.2.1.yosemite.bottle.tar.gz
🍺 /usr/local/Cellar/xz/5.2.1: 59 files, 1.7M
==> Installing dpkg
==> Downloading https://homebrew.bintray.com/bottles/dpkg-1.17.25_1.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring dpkg-1.17.25_1.yosemite.bottle.tar.gz
==> Caveats
This installation of dpkg is not configured to install software, so
commands such as `dpkg -i`, `dpkg --configure` will fail.
==> Summary
🍺 /usr/local/Cellar/dpkg/1.17.25_1: 246 files, 5.3M

Error installing wine on OS X 10.9.5

I'm trying to install wine on Mac OS X 10.9.5, but I'm getting some kind of error.
Here is output after
brew install wine
==> Installing dependencies for wine: fontconfig, libtiff, gd, libgphoto2, little-cms2, jasper, libicns, makedepend, openssl, sane-backends
==> Installing wine dependency: fontconfig
==> Downloading http://fontconfig.org/release/fontconfig-2.11.1.tar.bz2
Already downloaded: /Library/Caches/Homebrew/fontconfig-2.11.1.tar.bz2
==> Patching
patching file fc-cache/fc-cache.c
patching file fontconfig/fontconfig.h
patching file src/fccache.c
patching file src/fcdir.c
patching file src/fcfs.c
patching file src/fcint.h
patching file src/fcpat.c
==> ./configure --disable-silent-rules --with-add-fonts=/System/Library/Fonts,/Library/Fonts,~/Library/Fonts --prefix=/usr/local/Cellar/fontconfig/2.11.1 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc
==> make install RUN_FC_CACHE_TEST=false
make[2]: *** [install-data-local] Error 1
make[2]: *** Waiting for unfinished jobs....
/usr/bin/install -c -m 644 fonts.dtd '/usr/local/Cellar/fontconfig/2.11.1/share/xml/fontconfig'
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
READ THIS: https://git.io/brew-troubleshooting
Now I'm not much familiar with brew but if someone can point me on the right track I would appreciate it very much.
Btw, the single reason I'm trying to install wine is so that I can play Civilization3 on OSX.
In the end I installed wine via wineskin.

Resources