Linux PERMISSION_DENIEDMedium

Error 'Permission denied' when installing packages on Linux

The 'Permission denied' error occurs when installing packages on Linux due to insufficient user rights. It is most often resolved by running with sudo or adjusting permissions.

Updated at February 11, 2026
5-10 min
Easy
FixPedia Team
Применимо к:UbuntuDebianFedoraArch Linux

If you encounter 'Permission denied' while installing packages on Linux, it means the current user does not have permission to perform the operation. This is a common issue for commands like apt install, dnf install, or pacman -S.

Below are quick ways to resolve this.


Method 1: Using sudo

  1. Add sudo before the installation command, for example:
sudo apt install package_name
  1. Enter the user password and execute the command

Method 2: Checking directory permissions

  • Make sure the user has permissions for the installation folder
  • If necessary, change the permissions:
sudo chown $USER:$USER /path/to/directory

Method 3: Updating the package list

  • On Ubuntu/Debian:
    sudo apt update
    
  • On Fedora:
    sudo dnf check-update
    
  • On Arch Linux:
    sudo pacman -Syu
    

Additional reasons

  • Attempting to install without root
  • AppArmor/SELinux restrictions
  • The package is corrupted or the repository is unavailable

Conclusion

The 'Permission denied' error is usually resolved by running the command with sudo or adjusting user permissions. Checking repositories and updating the system helps with rare failures.

Did this article help you solve the problem?

FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

© 2026 FixPedia. All materials are available for free.

Made with for the community