Score:1

Unable to install mesa & upgrade OpenGL in Ubuntu 18.04 LXC container

cn flag

Problem:
I am trying to upgrade my OpenGL to 3.3+. According to the output of Webots, it seems that my server (container of Ubuntu 18.04) is equipped with OpenGL 3.1:

root@zc:~# webots
Fontconfig error: Cannot load default config file
FATAL: Webots requires OpenGL 3.3 while only OpenGL 3.1 can be initialized.

I cannot use glxinfo command:

root@zc:~# glxinfo | grep "OpenGL version"
-bash: glxinfo: command not found

When I tried to install mesa-utils, I met unmet dependencies:

root@zc:~# sudo apt-get install mesa-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 cuda-drivers : Depends: nvidia-compute-utils-440 (>= 440.33.01) but it is not going to be installed
                Depends: nvidia-utils-440 (>= 440.33.01) but it is not going to be installed
 nvidia-driver-440 : Depends: nvidia-compute-utils-440 (= 440.33.01-0ubuntu1) but it is not going to be installed
                     Depends: nvidia-utils-440 (= 440.33.01-0ubuntu1) but it is not going to be installed
                     Recommends: libnvidia-compute-440:i386 (= 440.33.01-0ubuntu1) but it is not installable
                     Recommends: libnvidia-decode-440:i386 (= 440.33.01-0ubuntu1) but it is not installable
                     Recommends: libnvidia-encode-440:i386 (= 440.33.01-0ubuntu1) but it is not installable
                     Recommends: libnvidia-ifr1-440:i386 (= 440.33.01-0ubuntu1) but it is not installable
                     Recommends: libnvidia-fbc1-440:i386 (= 440.33.01-0ubuntu1) but it is not installable
                     Recommends: libnvidia-gl-440:i386 (= 440.33.01-0ubuntu1) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

My GPU (output of nvidia-smi, 2*1080 Ti):

+---------------------------------------------+
| NVIDIA-SMI 460.73.01    Driver Version: 460.73.01    CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+

Output of nvcc -V (my pytorch is based on cuda 10.2 and it can run):

root@zc:~# nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89

What I tried:

    root@zc:~# apt --fix-broken install
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Correcting dependencies... Done
    The following additional packages will be installed:
      nvidia-compute-utils-440 nvidia-utils-440
    The following NEW packages will be installed:
      nvidia-compute-utils-440 nvidia-utils-440
    0 upgraded, 2 newly installed, 0 to remove and 28 not upgraded.
    385 not fully installed or removed.
    Need to get 0 B/418 kB of archives.
    After this operation, 1,298 kB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    Get:1 file:/var/cuda-repo-10-2-local-10.2.89-440.33.01  nvidia-compute-utils-440 440.33.01-0ubuntu1 [73.8 kB]
    Get:2 file:/var/cuda-repo-10-2-local-10.2.89-440.33.01  nvidia-utils-440 440.33.01-0ubuntu1 [345 kB]
    dpkg: warning: files list file for package 'libquadmath0:amd64' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'libnpth0:amd64' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'fdisk' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'iputils-ping' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'ubuntu-advantage-tools' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'libedit2:amd64' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'python3-cryptography' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'libpam-runtime' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'vim-tiny' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'libncurses5:amd64' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'libcom-err2:amd64' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'libgomp1:amd64' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'libatomic1:amd64' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'libpython3-stdlib:amd64' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'cpp' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'python-pip-whl' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'libapt-pkg5.0:amd64' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'libaudit1:amd64' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'readline-common' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'python3-yaml' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'libpython3.6-stdlib:amd64' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'ncurses-term' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'console-setup' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'libtinfo5:amd64' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'libapt-inst2.0:amd64' missing; assuming package has no files currently installed
(And a lot of dpkg warning message here)
    dpkg: warning: files list file for package 'sed' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'libpython3.6:amd64' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'libsmartcols1:amd64' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'netbase' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'libpython3-dev:amd64' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'libisl19:amd64' missing; assuming package has no files currently installed
    dpkg: warning: files list file for package 'binutils-x86-64-linux-gnu' missing; assuming package has no files currently installed
    (Reading database ... 18232 files and directories currently installed.)
    Preparing to unpack .../nvidia-compute-utils-440_440.33.01-0ubuntu1_amd64.deb ...
    Unpacking nvidia-compute-utils-440 (440.33.01-0ubuntu1) ...
    dpkg: error processing archive /var/cuda-repo-10-2-local-10.2.89-440.33.01/./nvidia-compute-utils-440_440.33.01-0ubuntu1_amd64.deb (--unpack):
     unable to make backup link of './usr/bin/nvidia-cuda-mps-control' before installing new version: Invalid cross-device link
    Preparing to unpack .../nvidia-utils-440_440.33.01-0ubuntu1_amd64.deb ...
    Unpacking nvidia-utils-440 (440.33.01-0ubuntu1) ...
    dpkg: error processing archive /var/cuda-repo-10-2-local-10.2.89-440.33.01/./nvidia-utils-440_440.33.01-0ubuntu1_amd64.deb (--unpack):
     unable to make backup link of './usr/bin/nvidia-debugdump' before installing new version: Invalid cross-device link
    dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
    Errors were encountered while processing:
     /var/cuda-repo-10-2-local-10.2.89-440.33.01/./nvidia-compute-utils-440_440.33.01-0ubuntu1_amd64.deb
     /var/cuda-repo-10-2-local-10.2.89-440.33.01/./nvidia-utils-440_440.33.01-0ubuntu1_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

So what is the root of the problem and how can i fix it? Why I have unmet dependencies despite the 460 driver I have?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.