Cannot set cpp alternatives link
I came across this problem when I was trying to debug one of my GitHub Actions workflows running on GitHub's Ubuntu 24.04 runners. Since I was able to reproduce the problem in the ubuntu:noble docker container (Image bf3dc08bfed0), I thought I would ask here.
After starting the interactive container on my host machine (running Fedora 40) using
sudo docker container run -it ubuntu:noble /bin/bash
I ran the following commands
1. apt update
2. apt install cpp
3. update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-13 13
I get the following output from the last command
update-
update-
update-
The link /usr/bin/cpp also no longer exists.
The above commands work fine in the Ubuntu 22.04 docker container (well with cpp-11). The reason I want to do this is so that I can change the version of cpp that /usr/bin/cpp points to. I didn't bother changing the default version in the commands above just to make the reproducer simpler.
Is this expected behaviour? If so, is there an alternative way to do what I want to achieve?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Miren Radia for more information if necessary.