After installing youtube-dl on Ubuntu 21.10 with the instructions on github many applications, including default text editor, broke

Solution 1:

Here is a theory:

Before you ran the first command, /usr/local/bin/youtube-dl already existed and was a symlink to /usr/bin/firejail. Probably from some previous installation.

The curl ... -o /usr/local/bin/youtube-dl command does not replace the existing symlink with a new file. Instead it overwrites the contents of the file, which overwrites /usr/bin/firejail. Normally this is a multicall binary that checks the name it is called with and executes the actual application in a sandbox. But the youtube-dl code of course does nothing of that.

As confirmed in the comments, reinstalling firejail replaces /usr/bin/firejail with a working version.


For reference, the typical firejail configuration setup by firecfg works like this: for each sandboxed application, there is a symbolic link under /usr/local/bin that points to /usr/bin/firejail. The real executable is in /usr/bin and gets executed inside the sandbox. That is also why starting the programs with a full /usr/bin path still works, but the default path selects the symlink instead.