Update of AUR package fails because it uses the wrong cmake

I have the latest Manjaro version as “out of the box” with actually nothing changed, everything should be on default.
I tried to update metis https://aur.archlinux.org/packages/metis but it comes back to me with an error message.
The maintainer of package wrote
The problem is that it runs /home/sum/.local/bin/cmake instead of /usr/bin/cmake.
… but (sorry for that_ I have no idea why that does not work for me out of the box and how to fix it :pleading_face:

lets start with

which cmake
1 Like
$ which cmake

So it is a heavily modified system and not “out of the box”.

You might want to rethink what you did. Because by default there is nothing in ~/.local/bin/
An option would be to remove it, however depending on what you did it might be better to undo the changes properly.

I definitely have not made any changes consciously/deliberately.
Looking at the content of the folder I might have installed “python stuff” , unfortunately I can’t remember, (might have happened late at night), worst case just some script which I ran without fully understanding it.

$ ls  ~/.local/bin/
autoflake               ddgs                  identify-cli      openai                 pygptj             virtualenv
black                   dotenv                isympy            openapi-python-client  pyllamacpp         watchfiles
blackd                  flake8                jsonschema        pathy                  py.test-benchmark  watchmedo
cmake                   ghp-import            langchain-server  pinecone               pytest-benchmark   wsdump
convert-caffe2-to-onnx  google-oauthlib-tool  markdown_py       pre-commit             spacy              youtube_transcript_api
convert-onnx-to-caffe2  gtts-cli              mkdocs            publish.py             torchrun
cpack                   html2text             nltk              __pycache__            tqdm
cpuinfo                 httpx                 nodeenv           pycodestyle            transformers-cli
ctest                   huggingface-cli       normalizer        pyflakes               uvicorn

So, assuming that I do not know anymore what it was for, I can safely delete it ?
How can I set the reference to cmake back to the right one (there is no mention of cmake in .bashrc nor .bash_profile

Looks like pip --user stuff .

This is determent by the PATH variable. You can check it with

echo $PATH

It is composed in multiple steps and ~/.local/bin is sometimes added. I’m not sure where it is added in Manajro. It can be a system profile or environment file or a file in your home. It might be even added thru something else.
Either way something might break if you remove it.

This is the exact reason why e.g. pip --user install should be avoided.

The path $HOME/.local/bin is a systemd specification.

systemd-path user-binaries

The location is added with filesystem package and is located in /etc/profile.d/home-local-bin.sh and sourced by /etc/profile