PostgresApp
PostgresApp copied to clipboard
/bin/gdal-config triggers warnings with Homebrew
With Postgres 9.5.4.2 and Homebrew 1.1.0:
~ brew -v && brew doctor
Homebrew 1.1.0
Homebrew/homebrew-core (git revision 375a8; last commit 2016-11-07)
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
/Applications/Postgres.app/Contents/Versions/latest/bin/gdal-config
I don't see what the problem is? Postgres.app includes gdal, and it includes gdal-config so you can link it.
Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue.
Is this causing an actual issue or are you just worried about the warning?
@jakob Just pointing out it throws a warning after updating. Aware that the warnings are just that: warnings. Just thought I'd let you know! :) Feel free to close.
i am not very sure about this but after downgrading from Postgres 9.6 to 9.5 the left over gdal-config brakes rvm ruby installer
@ionbaratol Could you explain in more detail what you did? Why do you think gdal-config interferes with rvm?
I am seeing the same warning.
Could this could be related to adding /Applications/Postgres.app/Contents/Versions/latest/bin to the path? .. to be able to use PostgreSQL's command line tools (psql, pg_dump, ...).
See postgres app's installation instructions (https://postgresapp.com):
...
3. Configure your $PATH to use the included command line tools (optional):
sudo mkdir -p /etc/paths.d &&
echo /Applications/Postgres.app/Contents/Versions/latest/bin | sudo tee /etc/paths.d/postgresapp
...
Hello CarlosCD, I do this:
sudo mkdir -p /etc/paths.d &&
echo /Applications/Postgres.app/Contents/Versions/latest/bin | sudo tee /etc/paths.d/postgresapp
Password:
/Applications/Postgres.app/Contents/Versions/latest/bin
So when I run brew doctor I have the same warning:
brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
/Applications/Postgres.app/Contents/Versions/latest/bin/gdal-config
Warning: Your Xcode (9.1) is outdated.
Please update to Xcode 9.2 (or delete it).
Xcode can be updated from the App Store.
Can you help me with this please?
Same brew doctor warning here.
Since you recommend adding /Applications/Postgres.app/Contents/Versions/latest/bin/ to $PATH for acess to the sql command line tools, and brew doesn't like *-config files in $PATH, it would be nice to have the command line tools provided (or linked) in a folder which doesn't contain this config file.
The warning says:
If everything you use Homebrew for is working fine: please don't worry or file an issue; just ignore this.
Are you having any problems that you believe may be caused by the config files?
I have the same issue here :/
I see a solution for pyenv here but I try and not works too
alias brew='env PATH="${PATH//$(pyenv root)\/shims://Applications\/Postgres.app\/Contents\/Versions\/latest\/bin:/}" brew'
@FrancoTampieri
Change the script to this:
#!/bin/sh
# check if pyenv is available
# edit: fixed redirect issue in earlier version
if which pyenv >/dev/null 2>&1; then
# assumes default location of brew in `/usr/local/bin/brew`
TMPPATH="${PATH//$(pyenv root)\/shims:/}"
TMPPATH="${TMPPATH/\/Applications\/Postgres.app\/Contents\/Versions\/latest\/bin:/}"
/usr/bin/env PATH="${TMPPATH}" /usr/local/bin/brew "$@"
else
/usr/local/bin/brew "$@"
fi
@FrancoTampieri
Change the script to this:
#!/bin/sh # check if pyenv is available # edit: fixed redirect issue in earlier version if which pyenv >/dev/null 2>&1; then # assumes default location of brew in `/usr/local/bin/brew` TMPPATH="${PATH//$(pyenv root)\/shims:/}" TMPPATH="${TMPPATH/\/Applications\/Postgres.app\/Contents\/Versions\/latest\/bin:/}" /usr/bin/env PATH="${TMPPATH}" /usr/local/bin/brew "$@" else /usr/local/bin/brew "$@" fi
Neah, sorry I have the same output:
(system)🍀 ~:francotampieri$ >brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
/Applications/Postgres.app/Contents/Versions/latest/bin/gdal-config
(system)🍀 ~:francotampieri$ >
Either your environment is different than mine or you're doing something wrong. I'm using that exact script, and it works fine. It's just doing a simple search/replace of the offending paths.
What does which brew say?
EDIT: You're probably not using pyenv. Then you should do this:
#!/bin/sh
# assumes default location of brew in `/usr/local/bin/brew`
TMPPATH="${PATH/\/Applications\/Postgres.app\/Contents\/Versions\/latest\/bin:/}"
/usr/bin/env PATH="${TMPPATH}" /usr/local/bin/brew "$@"
mmm no I'm using pyenv, but I have a script that modify the PROMPT and probably other enviroment configuration... I try reduce all to a clean install and I ask u what make the problem.
According to the answer, probably for Homebrew is not affected.
The culprit is indeed this line in HomeBrew:
https://github.com/Homebrew/homebrew/blob/master/Library/Homebrew/cmd/doctor.rb#L611
It's looking for a file that follows the convention *-config, which in this case, yours does. As already stated, it is not an error, just a warning. In order to solve the problem they would have to have a whitelist of all possibles which would not scale, so they are doing a best guess.