Specifically, when trying to install freeglut3-dev, I get an error of broken dependencies. I already tried with the classic: fixing the packages and different methods that I found, but nothing is fixing this error. My system is Ubuntu 18.04
sudo apt-get update --fix-missing
sudo dpkg --configure -a
sudo apt-get install -f
sudo apt upgrade
The error When installing:
sudo apt-get install freeglut3-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
freeglut3-dev : Depends: libgl1-mesa-dev but it is not going to be installed or
libgl-dev
Depends: libglu1-mesa-dev but it is not going to be installed or
libglu-dev
E: Unable to correct problems, you have held broken packages.
Previous to this, I was having a lot of issues with nvidia, cuda and cudnn, so if I recall properly, I think I added some local repos (added ppas, but not sure) from a university in China . To install some versions of CUDA, those versions worked for Ubuntu 16.04, so this might be making the error. When doing apt update
, I don't recall seeing before the format of GET IGN of a file like
Get:1 file:/var/cuda-repo-ubuntu1804-11-6-local InRelease
Ign:1 file:/var/cuda-repo-ubuntu1804-11-6-local InRelease
But I really am very lost and have been working around this for some time. If my guess is right, deleting those should fix this. But I am not sure if that's the correct answer, or even how to do it.
sudo apt update
Get:1 file:/var/cuda-repo-ubuntu1804-11-6-local InRelease
Ign:1 file:/var/cuda-repo-ubuntu1804-11-6-local InRelease
Get:2 file:/var/cudnn-local-repo-ubuntu1804-8.4.0.27 InRelease
Ign:2 file:/var/cudnn-local-repo-ubuntu1804-8.4.0.27 InRelease
Get:3 file:/var/cuda-repo-ubuntu1804-11-6-local Release [564 B]
Get:4 file:/var/cudnn-local-repo-ubuntu1804-8.4.0.27 Release [564 B]
Get:3 file:/var/cuda-repo-ubuntu1804-11-6-local Release [564 B]
Get:4 file:/var/cudnn-local-repo-ubuntu1804-8.4.0.27 Release [564 B]
Hit:5 https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/amd64 InRelease
Hit:6 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:7 https://nvidia.github.io/nvidia-container-runtime/stable/ubuntu18.04/amd64 InRelease
Hit:8 https://nvidia.github.io/nvidia-docker/ubuntu18.04/amd64 InRelease
Hit:9 https://linux.teamviewer.com/deb stable InRelease
Hit:11 http://es.archive.ubuntu.com/ubuntu bionic InRelease
Hit:12 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic InRelease
Hit:13 http://es.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:14 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease
Hit:15 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:17 http://ppa.launchpad.net/obsproject/obs-studio/ubuntu bionic InRelease
Hit:18 https://packagecloud.io/AtomEditor/atom/any any InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Edit: I just checked my history browser to make sure about the adding repos, and I think it was just for conda, not particularly for ubuntu but again, I am not sure if it has any impact. Not an Ubuntu expert:
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
Maybe when I tried this sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
and
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run
Edit 2: Output of
grep -Rn --include=*.list ^[^#] /etc/apt/
/etc/apt/sources.list:5:deb http://es.archive.ubuntu.com/ubuntu/ bionic main restricted
/etc/apt/sources.list:15:deb http://es.archive.ubuntu.com/ubuntu/ bionic universe
/etc/apt/sources.list:24:deb http://es.archive.ubuntu.com/ubuntu/ bionic multiverse
/etc/apt/sources.list:33:deb http://es.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
/etc/apt/sources.list:43:deb http://security.ubuntu.com/ubuntu bionic-security main restricted
/etc/apt/sources.list:45:deb http://security.ubuntu.com/ubuntu bionic-security universe
/etc/apt/sources.list:47:deb http://security.ubuntu.com/ubuntu bionic-security multiverse
/etc/apt/sources.list:49:deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main
/etc/apt/sources.list:51:deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
/etc/apt/sources.list.d/cuda-ubuntu1804-11-6-local.list:1:deb file:///var/cuda-repo-ubuntu1804-11-6-local /
/etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-bionic.list:1:deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic main
/etc/apt/sources.list.d/nvidia-docker.list:1:deb https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/$(ARCH) /
/etc/apt/sources.list.d/nvidia-docker.list:3:deb https://nvidia.github.io/nvidia-container-runtime/stable/ubuntu18.04/$(ARCH) /
/etc/apt/sources.list.d/nvidia-docker.list:5:deb https://nvidia.github.io/nvidia-docker/ubuntu18.04/$(ARCH) /
/etc/apt/sources.list.d/cudnn-local-ubuntu1804-8.4.0.27.list:1:deb file:///var/cudnn-local-repo-ubuntu1804-8.4.0.27 /
/etc/apt/sources.list.d/teamviewer.list:19:deb https://linux.teamviewer.com/deb stable main
/etc/apt/sources.list.d/obsproject-ubuntu-obs-studio-bionic.list:1:deb http://ppa.launchpad.net/obsproject/obs-studio/ubuntu bionic main
/etc/apt/sources.list.d/graphics-drivers-ubuntu-ppa-bionic.list:1:deb http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic main
/var
seems very unusual. – Organic Marble May 08 '22 at 17:20var
@OrganicMarble – M.K May 08 '22 at 17:23