0

I'm trying to install mesa-common-dev on Ubuntu LTS:

sudo apt-get install mesa-common-dev

however, the system returns:

    The following packages have unmet dependencies:  
     mesa-common-dev : Depends: libgl-dev but it is not going to be installed
                       Depends: libglx-dev but it is not going to be installed
                       Depends: libglx-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

apt-cache policy mesa-common-dev

mesa-common-dev:
  Installed: (none)
  Candidate: 20.0.4-2ubuntu1
  Version table:
     20.0.4-2ubuntu1 500
        500 http://br.archive.ubuntu.com/ubuntu focal/main amd64 Packages

apt-cache policy libgl-dev

libgl-dev:
  Installed: 1.3.2-1~ubuntu0.20.04.1
  Candidate: 1.3.2-1~ubuntu0.20.04.1
  Version table:
 *** 1.3.2-1~ubuntu0.20.04.1 100
        100 /var/lib/dpkg/status
     1.3.1-1 500
        500 http://br.archive.ubuntu.com/ubuntu focal/main amd64 Packages

apt-cache policy libglx-dev

libglx-dev:
  Installed: 1.3.2-1~ubuntu0.20.04.1
  Candidate: 1.3.2-1~ubuntu0.20.04.1
  Version table:
 *** 1.3.2-1~ubuntu0.20.04.1 100
        100 /var/lib/dpkg/status
     1.3.1-1 500
        500 http://br.archive.ubuntu.com/ubuntu focal/main amd64 Packages

apt-cache policy libdrm-dev

libdrm-dev:
  Installed: (nenhum)
  Candidate: 2.4.101-2
  Version table:
     2.4.101-2 500
        500 http://br.archive.ubuntu.com/ubuntu focal/main amd64 Packages

Thank you so much



grep -Rn --include=*.list ^[^#] /etc/apt/

/etc/apt/sources.list:5:deb http://br.archive.ubuntu.com/ubuntu/ focal main restricted
/etc/apt/sources.list:15:deb http://br.archive.ubuntu.com/ubuntu/ focal universe
/etc/apt/sources.list:24:deb http://br.archive.ubuntu.com/ubuntu/ focal multiverse
/etc/apt/sources.list:42:deb http://security.ubuntu.com/ubuntu focal-security main restricted
/etc/apt/sources.list:44:deb http://security.ubuntu.com/ubuntu focal-security universe
/etc/apt/sources.list:46:deb http://security.ubuntu.com/ubuntu focal-security multiverse
/etc/apt/sources.list.d/google-chrome.list:3:deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/opera-stable.list:4:deb https://deb.opera.com/opera-stable/ stable non-free #Opera Browser (final releases)
/etc/apt/sources.list.d/sublime-text.list:1:deb https://download.sublimetext.com/ apt/stable/
/etc/apt/sources.list.d/microsoft-edge-beta.list:3:deb [arch=amd64] http://packages.microsoft.com/repos/edge/ stable main


SUCCESS!! I add:

deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse

in the source.list file.

thanks for helping me

1
  • Welcome. Please add the output of grep -Rn --include=\*.list ^[^\#] /etc/apt/ to your question.
    – GAD3R
    Jun 16 '21 at 16:26
0

focal-updates is missing in your /etc/apt/sources.list, to correct the problem:

echo "deb http://archive.ubuntu.com/ubuntu focal-updates main restricted  universe multiverse" |\
sudo tee -a /etc/apt/sources.list
sudo apt update
sudo apt install mesa-common-dev

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.