#if using GCC compiler
cmake .. && make bgmg -j16
sudo apt-get install g++
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:
g++ : Depends: g++-9 (>= 9.3.0-3~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
solved
sudo apt install aptitude
sudo aptitude install build-essential
The following NEW packages will be installed:
build-essential g++{a} g++-9{a} libc-dev-bin{a} libc6-dev{ab}
libcrypt-dev{a} libstdc++-9-dev{a} linux-libc-dev{a}
0 packages upgraded, 8 newly installed, 0 to remove and 187 not upgraded.
Need to get 14.0 MB of archives. After unpacking 73.5 MB will be used.
The following packages have unmet dependencies:
libc6-dev : Depends: libc6 (= 2.31-0ubuntu9.7) but 2.31-0ubuntu9.9 is installed
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) build-essential [Not Installed]
2) g++ [Not Installed]
3) g++-9 [Not Installed]
4) libc6-dev [Not Installed]
5) libstdc++-9-dev [Not Installed]
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:
Downgrade the following packages:
1) libc6 [2.31-0ubuntu9.9 (now) -> 2.31-0ubuntu9.7 (focal-security)]
2) libc6-dbg [2.31-0ubuntu9.9 (now) -> 2.31-0ubuntu9.7 (focal-security)]
Accept this solution? [Y/n/q/?] Y
The following packages will be DOWNGRADED:
libc6 libc6-dbg
The following NEW packages will be installed:
build-essential g++{a} g++-9{a} libc-dev-bin{a} libc6-dev{a}
libcrypt-dev{a} libstdc++-9-dev{a} linux-libc-dev{a}
0 packages upgraded, 8 newly installed, 2 downgraded, 0 to remove and 187 not upgraded.
Need to get 27.2 MB of archives. After unpacking 120 MB will be used.
Do you want to continue? [Y/n/?] Y
Get: 1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 libcrypt-dev amd64 1:4.4.10-10ubuntu4 [104 kB]
Get: 2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 g++ amd64 4:9.3.0-1ubuntu2 [1,604 B]
Get: 3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 build-essential amd64 12.8ubuntu1 [4,624 B]
Get: 4 http://security.ubuntu.com/ubuntu focal-security/main amd64 libc6-dbg amd64 2.31-0ubuntu9.7 [10.5 MB]
Get: 5 http://security.ubuntu.com/ubuntu focal-security/main amd64 libc6 amd64 2.31-0ubuntu9.7 [2,714 kB]
Get: 6 http://security.ubuntu.com/ubuntu focal-security/main amd64 libc-dev-bin amd64 2.31-0ubuntu9.7 [71.6 kB]
Get: 7 http://security.ubuntu.com/ubuntu focal-security/main amd64 linux-libc-dev amd64 5.4.0-165.182 [1,112 kB]
Get: 8 http://security.ubuntu.com/ubuntu focal-security/main amd64 libc6-dev amd64 2.31-0ubuntu9.7 [2,518 kB]
Get: 9 http://security.ubuntu.com/ubuntu focal-security/main amd64 libstdc++-9-dev amd64 9.4.0-1ubuntu1~20.04.2 [1,722 kB]
Get: 10 http://security.ubuntu.com/ubuntu focal-security/main amd64 g++-9 amd64 9.4.0-1ubuntu1~20.04.2 [8,421 kB]
Fetched 27.2 MB in 6s (4,246 kB/s)
Preconfiguring packages ...