cannot update to 0.18

Having trouble installing or compiling FreeCAD? Get help here.
tjp
Posts: 25
Joined: Mon Apr 08, 2019 9:09 pm

cannot update to 0.18

Postby tjp » Mon May 13, 2019 1:30 pm

I am trying to update from 0.17 to 0.18 on Ubuntu 16.04. I added the repository:

sudo add-apt-repository ppa:freecad-maintainers/freecad-stable

and then

sudo apt-get update
Hit:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Hit:3 http://ppa.launchpad.net/freecad-mainta ... ble/ubuntu xenial InRelease

But, still have 0.17.

OS: Ubuntu 16.04.6 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13522 (Git)
Build type: None
Branch: releases/FreeCAD-0-17
Hash: 3bb5ff4e70c0c526f2d9dd69b1004155b2f527f2
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)

tj
User avatar
kkremitzki
Posts: 2168
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: cannot update to 0.18

Postby kkremitzki » Mon May 13, 2019 1:49 pm

Running sudo apt-get update just refreshes your local list of packages by getting the indexes from remote servers. If you want to upgrade the package, in this case, you need to run sudo apt-get dist-upgrade.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
vocx
Posts: 5206
Joined: Thu Oct 18, 2018 9:18 pm

Re: cannot update to 0.18

Postby vocx » Mon May 13, 2019 4:16 pm

tjp wrote:
Mon May 13, 2019 1:30 pm
I am trying to update from 0.17 to 0.18 on Ubuntu 16.04. I added the repository:
Any reason you are still using Ubuntu 16.04? You should probably upgrade to 18.04 at least. In this version you will be able to use FreeCAD with Python 3. In the future FreeCAD won't support Python 2, so you should probably make the move before 0.19 is released (next year).
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
tjp
Posts: 25
Joined: Mon Apr 08, 2019 9:09 pm

Re: cannot update to 0.18

Postby tjp » Mon May 13, 2019 4:32 pm

Now something is really screwed up. I ran sudo apt-get dis-upgrade and it ran for a while and then did this:

Unpacking libocct-data-exchange-7.3:amd64 (7.3.0+dfsg1-5~ubuntu16.04.2) ...
dpkg: error processing archive /var/cache/apt/archives/libocct-data-exchange-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libTKSTEP209.so.7', which is also in package libocct-data-exchange-7.2:amd64 7.2.0-0ppa6~ubuntu16.04.1
No apport report written because MaxReports is reached already
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Errors were encountered while processing:
/var/cache/apt/archives/libocct-foundation-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb
/var/cache/apt/archives/libocct-modeling-data-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb
/var/cache/apt/archives/libocct-modeling-algorithms-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb
/var/cache/apt/archives/libocct-visualization-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb
/var/cache/apt/archives/libocct-ocaf-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb
/var/cache/apt/archives/libocct-data-exchange-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

and now freecad executable has disappeared. It was /usr/bin/freecad, but now freecad is no longer in my path.

What happened?

tj
User avatar
kkremitzki
Posts: 2168
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: cannot update to 0.18

Postby kkremitzki » Mon May 13, 2019 4:48 pm

You already have OpenCASCADE version 7.2.0 packages installed and the 7.3.0 packages needed by FreeCAD failed to replace the old ones. Try sudo apt remove \*occt\* to get rid of any OpenCASCADE package and then once again run the command to install FreeCAD.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
tjp
Posts: 25
Joined: Mon Apr 08, 2019 9:09 pm

Re: cannot update to 0.18

Postby tjp » Mon May 13, 2019 5:21 pm

OK, I ran remove \*occt\* ,

tj@laptop:~$ sudo apt remove \*occt\*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'occt-misc' for glob '*occt*'
Note, selecting 'libocct-ocaf-7.2' for glob '*occt*'
Note, selecting 'libocct-ocaf-7.3' for glob '*occt*'
Note, selecting 'libocct-ocaf-dev' for glob '*occt*'
Note, selecting 'libocct-data-exchange-7.2' for glob '*occt*'
Note, selecting 'libocct-data-exchange-7.3' for glob '*occt*'
Note, selecting 'libocct-data-exchange-dev' for glob '*occt*'
Note, selecting 'libocct-doc' for glob '*occt*'
Note, selecting 'libocct-visualization-7.2' for glob '*occt*'
Note, selecting 'libocct-visualization-7.3' for glob '*occt*'
Note, selecting 'libocct-visualization-dev' for glob '*occt*'
Note, selecting 'libocct-modeling-algorithms-7.2' for glob '*occt*'
Note, selecting 'libocct-modeling-algorithms-7.3' for glob '*occt*'
Note, selecting 'libocct-modeling-algorithms-dev' for glob '*occt*'
Note, selecting 'libocct-foundation-7.2' for glob '*occt*'
Note, selecting 'libocct-foundation-7.3' for glob '*occt*'
Note, selecting 'libocct-foundation-dev' for glob '*occt*'
Note, selecting 'libocct-modeling-data-7.2' for glob '*occt*'
Note, selecting 'libocct-modeling-data-7.3' for glob '*occt*'
Note, selecting 'libocct-modeling-data-dev' for glob '*occt*'
Note, selecting 'occt-draw' for glob '*occt*'
Note, selecting 'libocct-draw-7.3' for glob '*occt*'
Note, selecting 'libocct-draw-dev' for glob '*occt*'
Package 'libocct-data-exchange-dev' is not installed, so not removed
Package 'libocct-doc' is not installed, so not removed
Package 'libocct-draw-dev' is not installed, so not removed
Package 'libocct-foundation-dev' is not installed, so not removed
Package 'libocct-modeling-algorithms-dev' is not installed, so not removed
Package 'libocct-modeling-data-dev' is not installed, so not removed
Package 'libocct-ocaf-dev' is not installed, so not removed
Package 'libocct-visualization-dev' is not installed, so not removed
Package 'occt-draw' is not installed, so not removed
Package 'occt-misc' is not installed, so not removed
Package 'libocct-data-exchange-7.3' is not installed, so not removed
Package 'libocct-draw-7.3' is not installed, so not removed
Package 'libocct-foundation-7.3' is not installed, so not removed
Package 'libocct-modeling-algorithms-7.3' is not installed, so not removed
Package 'libocct-modeling-data-7.3' is not installed, so not removed
Package 'libocct-ocaf-7.3' is not installed, so not removed
Package 'libocct-visualization-7.3' is not installed, so not removed
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libfreecad-python2-0.18 : Depends: libocct-data-exchange-7.3 but it is not going to be installed
Depends: libocct-foundation-7.3 but it is not going to be installed
Depends: libocct-modeling-algorithms-7.3 but it is not going to be installed
Depends: libocct-modeling-data-7.3 but it is not going to be installed
Depends: libocct-ocaf-7.3 but it is not going to be installed
Depends: libocct-visualization-7.3 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

I then run
sudo apt-get install freecad
Reading package lists... Done
Building dependency tree
Reading state information... Done
freecad is already the newest version (2:0.18.1+dfsg1~201904300243~ubuntu16.04.1).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libfreecad-python2-0.18 : Depends: libocct-data-exchange-7.3 but it is not going to be installed
Depends: libocct-foundation-7.3 but it is not going to be installed
Depends: libocct-modeling-algorithms-7.3 but it is not going to be installed
Depends: libocct-modeling-data-7.3 but it is not going to be installed
Depends: libocct-ocaf-7.3 but it is not going to be installed
Depends: libocct-visualization-7.3 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

So, I try apt-get -f install, and after I enter "yes"
Do you want to continue? [Y/n]
(Reading database ... 809852 files and directories currently installed.)
Preparing to unpack .../libocct-foundation-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb ...
Unpacking libocct-foundation-7.3:amd64 (7.3.0+dfsg1-5~ubuntu16.04.2) ...
dpkg: error processing archive /var/cache/apt/archives/libocct-foundation-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libTKMath.so.7', which is also in package libocct-foundation-7.2:amd64 7.2.0-0ppa6~ubuntu16.04.1
Preparing to unpack .../libocct-modeling-data-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb ...
Unpacking libocct-modeling-data-7.3:amd64 (7.3.0+dfsg1-5~ubuntu16.04.2) ...
dpkg: error processing archive /var/cache/apt/archives/libocct-modeling-data-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libTKGeomBase.so.7', which is also in package libocct-modeling-data-7.2:amd64 7.2.0-0ppa6~ubuntu16.04.1
Preparing to unpack .../libocct-modeling-algorithms-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb ...
Unpacking libocct-modeling-algorithms-7.3:amd64 (7.3.0+dfsg1-5~ubuntu16.04.2) ...
dpkg: error processing archive /var/cache/apt/archives/libocct-modeling-algorithms-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libTKMesh.so.7', which is also in package libocct-modeling-algorithms-7.2:amd64 7.2.0-0ppa6~ubuntu16.04.1
Preparing to unpack .../libocct-visualization-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb ...
Unpacking libocct-visualization-7.3:amd64 (7.3.0+dfsg1-5~ubuntu16.04.2) ...
dpkg: error processing archive /var/cache/apt/archives/libocct-visualization-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libTKService.so.7', which is also in package libocct-visualization-7.2:amd64 7.2.0-0ppa6~ubuntu16.04.1
No apport report written because MaxReports is reached already
Preparing to unpack .../libocct-ocaf-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb ...
Unpacking libocct-ocaf-7.3:amd64 (7.3.0+dfsg1-5~ubuntu16.04.2) ...
dpkg: error processing archive /var/cache/apt/archives/libocct-ocaf-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libTKCDF.so.7', which is also in package libocct-ocaf-7.2:amd64 7.2.0-0ppa6~ubuntu16.04.1
No apport report written because MaxReports is reached already
Preparing to unpack .../libocct-data-exchange-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb ...
Unpacking libocct-data-exchange-7.3:amd64 (7.3.0+dfsg1-5~ubuntu16.04.2) ...
dpkg: error processing archive /var/cache/apt/archives/libocct-data-exchange-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libTKSTEP209.so.7', which is also in package libocct-data-exchange-7.2:amd64 7.2.0-0ppa6~ubuntu16.04.1
No apport report written because MaxReports is reached already
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Errors were encountered while processing:
/var/cache/apt/archives/libocct-foundation-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb
/var/cache/apt/archives/libocct-modeling-data-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb
/var/cache/apt/archives/libocct-modeling-algorithms-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb
/var/cache/apt/archives/libocct-visualization-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb
/var/cache/apt/archives/libocct-ocaf-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb
/var/cache/apt/archives/libocct-data-exchange-7.3_7.3.0+dfsg1-5~ubuntu16.04.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

In other words, no change. Still get errors.

tj
User avatar
kkremitzki
Posts: 2168
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: cannot update to 0.18

Postby kkremitzki » Mon May 13, 2019 5:30 pm

Can you wrap that output in code tags? It makes it easier to read for me and any others that might happen upon this thread.

Also, the problem is that the remove command did not actually remove the occt 7.2.0 packages, so of course the following commands would not work. Try adding \*freecad\* to the remove command and then it should remove the occt packages as well as any partially installed FreeCAD packages that are causing the remove to fail.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
tjp
Posts: 25
Joined: Mon Apr 08, 2019 9:09 pm

Re: cannot update to 0.18

Postby tjp » Mon May 13, 2019 8:59 pm

SUCCESS!!!!!

Did the following:
sudo apt remove \*freecad\*
it complained about no
<code>
Setting up hl1440lpr:i386 (1.1.2-1) ...
/var/lib/dpkg/info/hl1440lpr.postinst: 4: /var/lib/dpkg/info/hl1440lpr.postinst: /etc/init.d/lpd: not found
dpkg: error processing package hl1440lpr:i386 (--configure):
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
hl1440lpr:i386
E: Sub-process /usr/bin/dpkg returned an error code (1)
</code>

Tried sudo apt autoremove, same results.

Some research, I don't know a lot about the package system, led me to /var/lib/dpkg/info/hl1440lpr.postinst which contained a line to restart lpd. I commented that line out, reran autoremove which ran to completion and then apt-get install freecad. AND IT WORKED! I now have 0.18.1 running.

Mr. Kremitzki, thank you so, so much for your time and effort.

tj
User avatar
Kunda1
Posts: 8755
Joined: Thu Jan 05, 2017 9:03 pm

Re: cannot update to 0.18

Postby Kunda1 » Tue May 14, 2019 3:41 pm

tjp wrote:
Mon May 13, 2019 8:59 pm
Did the following:
Hey @tjp the forum uses bbcode, so it's actually square brackets

Code: Select all

[code]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
MostlyHarmless
Posts: 14
Joined: Wed Jan 03, 2018 8:28 pm
Location: Willow Grove, Pennsylvania, USA

Re: cannot update to 0.18

Postby MostlyHarmless » Sun Jun 16, 2019 3:23 pm

I found it increasingly difficult to install multiple, complex applications on the same system and keep their versions up to date. Especially applications that come with long lists of dependencies.

For that reason I recently switched to creating Docker containers for things like FreeCAD, Slic3r-PE, KiCad and so on. The results are rather promising. Each application now lives in its preferred habitat and I no longer have to worry that my host OS (CentOS) is usually years behind in new libraries for stability reasons. Boxed FreeCAD 0.18 into a container and launched it on CentOS 7 ... worked on first try.

I am aware that an Appimage is a similar approach. There just aren't Appimages available for all the applications I like to isolate.

My $.02
Jan