# Revision history [back]

In a terminal window, enter the command "which pkg-config". bash will search the PATH directories for a pkg-config file, and on my system it found one in /usr/local/bin. My guess is that it will find one there on your system, too. It's probably a remnant of another package installation, possibly one for Python.

Note: depending on the owner of the /usr/local/bin/pkg-config file, you may need to use sudo or chown to handle any ownership issues as part of performing the steps suggested below.

You could use the "mv" command to temporarily rename the pkg-config file in /usr/local/bin to some other name or to another directory that's NOT in the PATH list. Use the command "echo $PATH" to see the colon delimited list of directories in PATH. After the build, you can again use "mv" to reinstate that file. For instance jsmith$ mv /usr/local/bin/pkg-config /usr/local/bin/pkg-config.restore-after-build

After the build, you would rename it back:

jsmith$mv /usr/local/bin/pkg-config.restore-after-build /usr/local/bin/pkg-config A riskier approach would be to use the "export" command to redefine the PATH setting in the terminal window where you are running autogen.sh, and eventually the build. Your new PATH setting would not include "/usr/local/bin:". That directory typically contains products you've installed, so it's possible but unlikely the LibreOffice build will need them. For instance: jsmith$ echo $PATH /Users/jsmith/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/opt/X11/bin Note the presence of /usr/local/bin: in the setting. In the following export command, /usr/local/bin: has been removed. jsmith$ export PATH=/Users/jsmith/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/MacGPG2/bin:/opt/X11/bin

jsmith$echo$PATH

/Users/jsmith/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/opt/X11/bin

Changes to the PATH setting are only known to that terminal window and processes started from that window. If that window is closed, or if that setting is needed in another terminal window, the steps to alter the PATH setting will need to be repeated.