The problem is that the sudo is applying to the echo command but not to the dpkg. As the command that requires elevation is dpkg --set- selections, you should be able set the flag with either of the following commands:
sudo sh -c "echo libglul-mesa hold | dpkg --set-selections" or: echo libglul-mesa hold | sudo dpkg --set-selections -- dpkg pinning fails using dpkg --set-selections https://bugs.launchpad.net/bugs/360157 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs