0

I have tried to install clang_select in macOS 13.4.1 like this:

> sudo port install clang_select
--->  Cleaning clang_select
--->  Scanning binaries for linking errors
--->  No broken files found.
--->  No broken ports found.

but when I use this command in terminal:

> clang_select 16
zsh: command not found: clang_select

I have already add the path /opt/local/bin, why still contains this issue? this is the $PATH settings:

> echo $PATH

/opt/local/bin:/opt/local/sbin:/Users/xiaoqiangjiang/Library/pnpm:/Users/xiaoqiangjiang/.yarn/bin:/Users/xiaoqiangjiang/.config/yarn/global/node_modules/.bin:/Users/xiaoqiangjiang/anaconda3/bin:/Users/xiaoqiangjiang/.sdkman/candidates/java/current/bin:/Users/xiaoqiangjiang/.nvm/versions/node/v16.14.2/bin:/Users/xiaoqiangjiang/fvm/default/bin:/opt/homebrew/opt/openssl@3/bin:/opt/homebrew/opt/ruby/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/TeX/texbin:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/xiaoqiangjiang/.cargo/bin:/Applications/iTerm.app/Contents/Resources/utilities:/Users/xiaoqiangjiang/Library/Application Support/JetBrains/Toolbox/scripts:/Users/xiaoqiangjiang/.orbstack/bin:/Users/xiaoqiangjiang/Library/Python/3.10/bin:/Users/xiaoqiangjiang/.local/bin:/Users/xiaoqiangjiang/.pub-cache/bin:/Users/xiaoqiangjiang/.yarn/bin:/Users/xiaoqiangjiang/source/third-party/depot_tools:/Users/xiaoqiangjiang/Library/Python/3.10/bin:/Users/xiaoqiangjiang/.local/bin

this is the port version:

> port version
Version: 2.9.3

I also tried like this:

> echo 'export PATH="/opt/local/bin:/opt/local/sbin:$PATH"' >> ~/.zshrc

> source .zshrc

> clang_select
zsh: command not found: clang_select

still could not use the clang_select command.

0

1 Answer 1

4

That's not how the various *_select packages work in MacPorts.

Assuming you have more than one alternative available, the port select subcommand allows you to choose between them.

Example...

$ sudo port select --summary 
Name         Selected           Options
====         ========           =======
black        black311           black311 none
flake8       flake8-311         flake8-311 none
isort        isort311           isort311 none
pip          none               pip3-apple pip311 pip312 none
pip2         none               none
pip3         pip311             pip3-apple pip311 pip312 none
pycodestyle  pycodestyle-py311  pycodestyle-py311 none
pyflakes     py311-pyflakes     py311-pyflakes none
pygments     py311-pygments     py311-pygments none
pylint       pylint311          pylint311 none
python       none               python311 python312 none
python3      python311          python311 python312 none

Display the setting for a particular group...

$ sudo port select --list python3
Available versions for python3:
    none
    python311 (active)
    python312

Making a particular setting for a group...

$ sudo port select --set python3 python311
Selecting 'python311' for 'python3' succeeded. 'python311' is now active.

If you install clang_select, the control group will be named clang.

The man page for port-select is here.

You must log in to answer this question.

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