bash: apt-add-repository: command not found

Explanation of the Issue

The error "bash: apt-add-repository: command not found" occurs when the "apt-add-repository" command is not recognized by the system. This command is typically used in Debian-based systems to add third-party repositories. The error suggests that the command is either not installed or not available in the current environment.

Possible Solutions

  1. Check Command Availability: Confirm if the "apt-add-repository" command is available on the system by running the following command: bash which apt-add-repository

  2. Install Software Properties Common: If the "apt-add-repository" command is not found, it can be installed by installing the "software-properties-common" package. Use the following command to install it: bash sudo apt-get update sudo apt-get install software-properties-common

  3. Use add-apt-repository: If the "apt-add-repository" command is still not available after installing "software-properties-common," try using the "add-apt-repository" command instead. They serve the same purpose but might be named differently depending on the system.

Conclusion

By following the steps outlined above, you can address the "bash: apt-add-repository: command not found" issue in a Debian-based system.