uninstalled macports, and cannot use homebrew softwares anymore - bash

I'm trying to remove duplicate opencv versions on my mac. It seems that I have installed using both homebrew and mac port, so I decided to uninstall mac port completely, following this guide
But when I uninstalled mac-port and softwares installed with port, I couldn't use softwares installed by brew anymore
$ brew install pkg-config
$ pkg-config
-bash: /opt/local/bin/pkg-config: No such file or directory
I guess it's because the system still believes that pkg-config is in mac-port location. But how to fix it? I haven't find solutions with google.
Thanks in advance!

problem solved by editing PATH setting in ~/.bash_profile (or bashrc).

Related

Broken /usr/local/bin on ARM macOS Monterey

Since none of the commands of programs installed using brew did not work (e.g. although mysql and mongodb are both installed, commands like mongod or mysql on terminal prompted a command not found error), I was trying many solutions to solve the issue. In the meanwhile, I just found out that the /usr/local/bin folder is broken on my computer; if anyone got a solution, please let me know and thank you very much for your time!
P/S: My computer specs are: 16" Macbook Pro 2021 M1 Max
Screenshot
For M1 Macs, brew's bin folder is located at /opt/homebrew/bin.
which brew would display the full path for binary, and brew --prefix would show you the prefix path (it would work for both arm and x86 OS).
$ which brew
/opt/homebrew/bin/brew
$ brew --prefix
/opt/homebrew

How to change Homebrew's prefix?

I'm using MACOS M1, and started to install brew under ARM. Then at the other day, I installed some formula under x86.
When I run a command
brew doctor
And I got this message
Some of Homebrew's bottles (binary packages) can only be used with the default
prefix (/usr/local).
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
unsupported configuration.
How to change the prefix to /usr/local/?
When I run which -a brew I got this result
/opt/homebrew/bin/brew
/usr/local/bin/brew
Thanks in advance.
I had the same issue because I did not installed the homebrew from the local path on my terminal.
I just uninstalled the homebrew, installed it again (from the local path this time) and it is fine now.
To uninstall Homebrew, run the uninstall script from the HomeBrew/install repository.

GDL not found after installing with homebrew

I used brew install GDL. The install was completed, but once I try to use GDL, it says " command not found: gdl".
I used "which gdl", but still can't be located. I tried reinstalling GDL via brew, but same error.
I tried changing the directory to the folder where brew installed GDL, but no luck either.
I looked through my other compilers and those are saved into bin, while GDL is not (if that's relevant at this point).
Anything will help!
If the intention was to install GNU Data Language, please try installing gnudatalanguage from homebrew-science: https://github.com/brewsci/homebrew-science/blob/master/Formula/gnudatalanguage.rb

updating octave: linking the installation

I have OSX 10.10.5 with Octave 3.4.0 running (installed, who knows how, I did it a million different ways through port, file extraction, ftp, homebrew…). I tried to update my Programme (brew install octave or sudo port install octave) and Terminal spits out:
Warning: octave-3.8.2 already installed, it's just not linked
Okay, great. So I have a better programme somewhere installed. What now? How on earth am I supposed to “just link” the newer installation?
If you install octave with Homebrew and it doesn't link it it should tell you why. You can force Homebrew to link octave with
$ brew link --overwrite octave
You can also add the --dry-run option to check and see what Homebrew will do to link octave
$ brew link --overwrite --dry-run octave
A possible reason for Homebrew not linking octave is that you've installed it by another method, MacPorts for instance. It is not recommended that you use both Homebrew and MacPorts on the same system.

How can I install qpdf on Mac 10.8.3?

When running R CMD check on packages on a Mac build server, I'm getting a warning
‘qpdf’ is needed for checks on size reduction of PDFs
I can't seem to get qpdf installed and on the system. I tried installing via the fink package manager, but according to the package database (http://pdb.finkproject.org/pdb/package.php/qpdf), qpdf doesn't seem to have been built since osx 10.6, and I'm on 10.8.3.
Can anyone point me to qpdf mac install or build instructions? Or is there a way to disable the warning when checking R packages?
This is somewhat related to the question qpdf.exe for compactPDF?, although they were on a windows machine and I'm on a mac.
You can install qpdf with homebrew:
brew install qpdf
MacPorts can help you. Download MacPorts from http://www.macports.org/ and run sudo port install qpdf.

Resources