kicad 5.1 fails install. All 6 libocct-xxx fail to load due to unmet dependencies

Asked by James Robert Gilbert

I have ubuntu 20.04.6 and trying to load the kicad 5.1 package using from http://us.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
The following packages fail to load due to unmet dependencies.
 -libocct-foundation-7.3_7.3.3+dfsg1-1build1_amd64.deb
 -libocct-modeling-data-7.3_7.3.3+dfsg1-1build1_amd64.deb
-libocct-modeling-algorithms-7.3_7.3.3+dfsg1-1build1_amd64.deb
-libocct-visualization-7.3_7.3.3+dfsg1-1build1_amd64.deb
-libocct-ocaf-7.3_7.3.3+dfsg1-1build1_amd64.deb
-libocct-data-exchange-7.3_7.3.3+dfsg1-1build1_amd64.deb
Error shown is: E: Sub-process /usr/bin/dpkg returned an error code (1)
I don't know what the unmet dependencies are.
The Open Cascade Technology website does not seem to address the dependencies.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
James Robert Gilbert
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

What output do you receive for the following commands (to be executed in a terminal window):

uname -a
lsb_release -crid
sudo apt update
sudo apt install kicad

Revision history for this message
James Robert Gilbert (bobo23) said :
#2

Requested info to Manfred Hampl

I have a Lenovo T480s laptop with 23.4 GB of memory, Intel® Core™ i5-8350U CPU @ 1.70GHz × 8 processor

uname -a
Linux jimu2-T480s 5.4.0-177-generic #197-Ubuntu SMP Thu Mar 28 22:45:47 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal

sudo apt update
Hit:1 http://us.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:4 http://ppa.launchpad.net/freecad-maintainers/freecad-stable/ubuntu focal InRelease
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:6 https://dl.winehq.org/wine-builds/ubuntu focal InRelease
Hit:7 http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu focal InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
6 packages can be upgraded. Run 'apt list --upgradable' to see them.

sudo apt list --upgradable
Listing... Done
distro-info-data/focal-security,focal-security,focal-updates,focal-updates 0.43ubuntu1.16 all [upgradable from: 0.43ubuntu1.15]
firefox-locale-en/focal-security,focal-updates 125.0.3+build1-0ubuntu0.20.04.1 amd64 [upgradable from: 125.0.2+build1-0ubuntu0.20.04.2]
firefox/focal-security,focal-updates 125.0.3+build1-0ubuntu0.20.04.1 amd64 [upgradable from: 125.0.2+build1-0ubuntu0.20.04.2]
python3-update-manager/focal-updates,focal-updates 1:20.04.10.21 all [upgradable from: 1:20.04.10.20]
update-manager-core/focal-updates,focal-updates 1:20.04.10.21 all [upgradable from: 1:20.04.10.20]
update-manager/focal-updates,focal-updates 1:20.04.10.21 all [upgradable from: 1:20.04.10.20]

**************************************************************
sudo apt install kicad
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libocct-data-exchange-7.3 libocct-foundation-7.3 libocct-modeling-algorithms-7.3 libocct-modeling-data-7.3 libocct-ocaf-7.3
  libocct-visualization-7.3
Suggested packages:
  extra-xdg-menus kicad-doc-ca | kicad-doc-de | kicad-doc-en | kicad-doc-es | kicad-doc-fr | kicad-doc-id | kicad-doc-it | kicad-doc-ja | kicad-doc-pl
  | kicad-doc-ru | kicad-doc-zh kicad-packages3d
The following NEW packages will be installed:
  kicad libocct-data-exchange-7.3 libocct-foundation-7.3 libocct-modeling-algorithms-7.3 libocct-modeling-data-7.3 libocct-ocaf-7.3
  libocct-visualization-7.3
0 upgraded, 7 newly installed, 0 to remove and 6 not upgraded.
Need to get 0 B/43.5 MB of archives.
After this operation, 182 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 272730 files and directories currently installed.)
Preparing to unpack .../0-libocct-foundation-7.3_7.3.3+dfsg1-1build1_amd64.deb ...
Unpacking libocct-foundation-7.3:amd64 (7.3.3+dfsg1-1build1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-XZVcPa/0-libocct-foundation-7.3_7.3.3+dfsg1-1build1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libTKMath.so.7', which is also in package libocct-foundation-7.6:amd64 1:7.6.3+dfsg1-8~ubuntu20.04.1
Preparing to unpack .../1-libocct-modeling-data-7.3_7.3.3+dfsg1-1build1_amd64.deb ...
Unpacking libocct-modeling-data-7.3:amd64 (7.3.3+dfsg1-1build1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-XZVcPa/1-libocct-modeling-data-7.3_7.3.3+dfsg1-1build1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libTKBRep.so.7', which is also in package libocct-modeling-data-7.6:amd64 1:7.6.3+dfsg1-8~ubuntu20.04.1
Preparing to unpack .../2-libocct-modeling-algorithms-7.3_7.3.3+dfsg1-1build1_amd64.deb ...
Unpacking libocct-modeling-algorithms-7.3:amd64 (7.3.3+dfsg1-1build1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-XZVcPa/2-libocct-modeling-algorithms-7.3_7.3.3+dfsg1-1build1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libTKBO.so.7', which is also in package libocct-modeling-algorithms-7.6:amd64 1:7.6.3+dfsg1-8~ubuntu20.0
4.1
Preparing to unpack .../3-libocct-visualization-7.3_7.3.3+dfsg1-1build1_amd64.deb ...
Unpacking libocct-visualization-7.3:amd64 (7.3.3+dfsg1-1build1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-XZVcPa/3-libocct-visualization-7.3_7.3.3+dfsg1-1build1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libTKMeshVS.so.7', which is also in package libocct-visualization-7.6:amd64 1:7.6.3+dfsg1-8~ubuntu20.04.
1
No apport report written because MaxReports is reached already
                                                              Preparing to unpack .../4-libocct-ocaf-7.3_7.3.3+dfsg1-1build1_amd64.deb ...
Unpacking libocct-ocaf-7.3:amd64 (7.3.3+dfsg1-1build1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-XZVcPa/4-libocct-ocaf-7.3_7.3.3+dfsg1-1build1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libTKBin.so.7', which is also in package libocct-ocaf-7.6:amd64 1:7.6.3+dfsg1-8~ubuntu20.04.1
No apport report written because MaxReports is reached already
                                                              Preparing to unpack .../5-libocct-data-exchange-7.3_7.3.3+dfsg1-1build1_amd64.deb ...
Unpacking libocct-data-exchange-7.3:amd64 (7.3.3+dfsg1-1build1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-XZVcPa/5-libocct-data-exchange-7.3_7.3.3+dfsg1-1build1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libTKBinXCAF.so.7', which is also in package libocct-data-exchange-7.6:amd64 1:7.6.3+dfsg1-8~ubuntu20.04
.1
No apport report written because MaxReports is reached already
                                                              Selecting previously unselected package kicad.
Preparing to unpack .../6-kicad_5.1.5+dfsg1-2build2_amd64.deb ...
Unpacking kicad (5.1.5+dfsg1-2build2) ...
Errors were encountered while processing:
 /tmp/apt-dpkg-install-XZVcPa/0-libocct-foundation-7.3_7.3.3+dfsg1-1build1_amd64.deb
 /tmp/apt-dpkg-install-XZVcPa/1-libocct-modeling-data-7.3_7.3.3+dfsg1-1build1_amd64.deb
 /tmp/apt-dpkg-install-XZVcPa/2-libocct-modeling-algorithms-7.3_7.3.3+dfsg1-1build1_amd64.deb
 /tmp/apt-dpkg-install-XZVcPa/3-libocct-visualization-7.3_7.3.3+dfsg1-1build1_amd64.deb
 /tmp/apt-dpkg-install-XZVcPa/4-libocct-ocaf-7.3_7.3.3+dfsg1-1build1_amd64.deb
 /tmp/apt-dpkg-install-XZVcPa/5-libocct-data-exchange-7.3_7.3.3+dfsg1-1build1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Manfred Hampl (m-hampl) said (last edit ):
#3

Quote:
dpkg: error processing archive /tmp/apt-dpkg-install-XZVcPa/0-libocct-foundation-7.3_7.3.3+dfsg1-1build1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libTKMath.so.7', which is also in package libocct-foundation-7.6:amd64 1:7.6.3+dfsg1-8~ubuntu20.04.1
End of quote

Apparently there are two different versions of the libocct-* packages that cannot be installed at the same time (7.3 and 7.6)

What is the output of the command
apt policy libocct-foundation-7.3 libocct-foundation-7.6

As far as I can see, libocct-foundation-7.6 is the version for Ubuntu mantic which now conflicts with the version in the repositories for Ubuntu focal. That seems to be the root cause.

Remark:
There is a minor error in your package management configuration. Although you are running Ubuntu focal, there is a reference to Ubuntu bionic in your sources.list configuration file.

Revision history for this message
James Robert Gilbert (bobo23) said :
#4

To Manfred Hampl,
Success!!! Your suggestion of a incorrect libocct-foundation-7.6 was right. Here is what I did>

answer to Manfred :
apt policy libocct-foundation-7.3 libocct-foundation-7.6
libocct-foundation-7.3:
  Installed: (none)
  Candidate: 7.3.3+dfsg1-1build1
  Version table:
     7.3.3+dfsg1-1build1 500
        500 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
libocct-foundation-7.6:
  Installed: 1:7.6.3+dfsg1-8~ubuntu20.04.1
  Candidate: 1:7.6.3+dfsg1-8~ubuntu20.04.1
  Version table:
 *** 1:7.6.3+dfsg1-8~ubuntu20.04.1 500
        500 http://ppa.launchpad.net/freecad-maintainers/freecad-stable/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status

additional steps I did:
sudo apt remove kicad
sudo apt autoremove

This got rid of the partially working KiCAD program and the accompanying libraries.
It also removed a warning symbol in the top label area about the broken install.

I then backed up my /home directory to an external drive just in case anything died.

next I went into the Software&Updates->Other Software and removed the ppa references to the bionic security
and then did:
sudo apt update
[sudo] password for jim-u2:
Hit:1 http://us.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 https://dl.winehq.org/wine-builds/ubuntu focal InRelease
Hit:4 http://ppa.launchpad.net/freecad-maintainers/freecad-stable/ubuntu focal InRelease
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:6 http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu focal InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
14 packages can be upgraded. Run 'apt list --upgradable' to see them.

then did:
sudo apt remove libocct-foundation-7.6
sudo apt autoremove
sudo apt install kicad (NOTE: this installed error free this time!! Joy abounds!!)

installed the following packages:
extra-xdg-menus kicad-doc-en kicad-packages3d glew-utils wx3.0-doc
first checked with: sudo apt policy XXXXXX
followed by: sudo apt install XXXXXX

Tested install with some KiCAD projects I am working on and all worked as normal.

Thanks a bunch Manfred.