I recently upgraded to MacOS Catalina, on a 13-in, 2019 MacBook Pro.

I am installing some software, and the OS was complaining that it is not from a verified provider, so I decided to bypass it using:

sudo spctl --master-disable

However, I only got:

-bash: spctl: command not found

Here is my ~/.bash_profile

export PATH=$LD_LIBRARY_PATH:$HOME/.local/bin/
export PATH=$PATH:/bin:/usr/bin
export PATH=$PATH:/usr/local/bin/
export PATH=/opt/local/bin:/opt/local/sbin:$PATH

Any ideas how to fix it? spctl is a default function, so I guess I deleted something.

  • You current path is: /opt/local/bin:/opt/local/sbin:::/Users/your_user_name/.local/bin/:/bin:/usr/bin:/usr/local/bin/. The triple colon (only one is necessary!) is a result of export LD_LIBRARY_PATH=$LD_LIBRARY_PATH: (which doesn't make much sense!)
    – klanomath
    Apr 13, 2020 at 15:39
  • Just to explain the LD_LIBRARY thing: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH: results in : for LD_LIBRARY_PATH if the value of LD_LIBRARY_PATH was undefined/empty previously or VALUE: if LD_LIBRARY_PATH was VALUE
    – klanomath
    Apr 13, 2020 at 15:57

1 Answer 1

$ type spctl
spctl is /usr/sbin/spctl

So make sure to add /usr/sbin (and /sbin) to your PATH.

Usually this is done automatically in /etc/profile which takes all the paths listed in /etc/paths. As has been pointed out in the comments, you override this by setting the PATH to LD_LIBRARY_PATH in line 2 of your .bash_profile. If you fix this, you won't need line 3 (nor probably line 4) any longer.

  • Thank you. I will accept the answer in about ~6 mins. Are there any other standard paths that I am missing from my PATH?
    – John
    Apr 13, 2020 at 15:25
  • @John See updated answer.
    – nohillside
    Apr 13, 2020 at 15:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .