reinstall of freecad-daily

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

reinstall of freecad-daily

Post by keithsloan52 »

Think my copy of freecad-daily got corrupted so did
sudo apt-get remove freecad-daily and sudo ap-get purge freecad-daily then installed again
sudo apt-get install freecad-daily but on startup I get

Code: Select all

FreeCAD 0.19, Libs: 0.19R
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Traceback (most recent call last):
  File "<string>", line 1, in <module>
<class 'ModuleNotFoundError'>: No module named 'AttachmentEditor'
Also not convinced that the purge works as I get some messages from Modules in /usr/share/freecad-daily/
User avatar
kkremitzki
Veteran
Posts: 2518
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: reinstall of freecad-daily

Post by kkremitzki »

If at some point you've put files in to that location, you'll have to remove them manually.
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.
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: reinstall of freecad-daily

Post by keithsloan52 »

Same problem again

I run

Code: Select all

sudo apt-get remove --purge freecad-daily
Followed by

Code: Select all

sudo apt-get install freecad-daily
And freecad-daily no longer works and things like /usr/lib/freecad-daily are not setup.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: reinstall of freecad-daily

Post by vocx »

keithsloan52 wrote: Mon Jan 13, 2020 4:44 pm ...
And freecad-daily no longer works and things like /usr/lib/freecad-daily are not setup.
As kremitzki says, if there are files left over in some directories, you may have to remove them manually with

Code: Select all

sudo rm -rf /usr/share/freecad-daily
sudo rm -rf /usr/lib/freecad-daily
etc.
Also notice that you may have to purge other packages as well

Code: Select all

libfreecad-daily-python2-0.19
libfreecad-daily-python2-0.19:i386
libfreecad-daily-python3-0.19
libfreecad-daily-python3-0.19:i386
libfreecad-python2-0.18
libfreecad-python2-0.18:i386
libfreecad-python3-0.18
libfreecad-python3-0.18:i386

Code: Select all

sudo rm -rf /usr/lib/freecad-daily-python3
sudo rm -rf /usr/lib/freecad-daily-python2
etc.
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.
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: reinstall of freecad-daily

Post by keithsloan52 »

Tried

Code: Select all

sudo apt-get remove --purge freecad-daily
sudo rm -rf /usr/share/freecad-daily
sudo rm -rf /usr/lib/freecad-daily
sudo apt-get install --reinstall freecad-daily
Does not work. Don't see why the rm's are needed anyway. Purge should get rid of everything.
Sure this does not happen on other software.
Seems to me FreeCAD info for apt-get especially remove and purge is not complete.
User avatar
kkremitzki
Veteran
Posts: 2518
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: reinstall of freecad-daily

Post by kkremitzki »

Purge merely removes configuration files in addition to doing what remove does, it doesn't completely wipe paths.

When you do this, do you see anything unusual in your apt install output? Under the hood, these postinst scripts get run on installation to manage the symlinks needed for FreeCAD to work:
https://salsa.debian.org/science-team/f ... 3.postinst
https://salsa.debian.org/science-team/f ... 2.postinst

Code: Select all

#!/bin/sh

set -e

update-alternatives --install /usr/bin/freecad-daily freecad-daily /usr/lib/freecad-daily/bin/freecad-python3 30 \
                    --slave /usr/bin/freecadcmd-daily freecadcmd-daily /usr/lib/freecad-daily/bin/freecadcmd-python3 \
                    --slave /usr/lib/freecad-daily/lib freecadlib-daily /usr/lib/freecad-daily-python3/lib

#DEBHELPER#

exit 0
So it tries to create a symlink at /usr/bin/freecad-daily, /usr/bin/freecadcmd-daily, and /usr/lib/freecad-daily/lib. After removal, those files should not exist, and if they do, the postinst script will fail, resulting in a broken installation.

As far as I can tell this problem keeps popping up because people are sometimes given the advice to install things in system paths like /usr/lib/freecad-daily/Mod, and then when the system tries to do something to what should be a system-managed location, it fails because it detects the user has modified it and isn't sure how to proceed safely. If this is happening from other workflow, there's a bug, but nobody has indicated such a workflow for me to investigate.
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.
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: reinstall of freecad-daily

Post by keithsloan52 »

Okay when I listed /usr/bin/free* the daily versions were still there. Listed in red which I remember correctly means broken in some form.
Did

Code: Select all

sudo rm /usr/bin/freecad-daily
sudo rm /usr/bin/freecadcmd-daily
Nothing in /usr/lib/freecad-daily*

Tried install with

Code: Select all

sudo apt-get install --reinstall freecad-daily
It did not create anything in /usr/bin/free* so cannot start by just typing freecad-daily

In /usr/lib it created

Code: Select all

/usr/lib/freecad-daily-python3:
lib
User avatar
kkremitzki
Veteran
Posts: 2518
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: reinstall of freecad-daily

Post by kkremitzki »

keithsloan52 wrote: Tue Jan 14, 2020 11:01 am
Tried install with

Code: Select all

sudo apt-get install --reinstall freecad-daily
Try the same command with freecad-daily-python3 package, freecad-daily is just a meta-package that pulls in other freecad packages that have the actual content.
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.
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: reinstall of freecad-daily

Post by keithsloan52 »

Tried and got

Code: Select all

Setting up freecad-daily-python3 (0.19~pre2~202001131534~ubuntu18.04.1) ...
update-alternatives: warning: forcing reinstallation of alternative /usr/lib/freecad-daily/bin/freecad-python3 because link group freecad-daily is broken
Could start freecad-daily but clearly broken so tried

Code: Select all

sudo apt-get remove --purge freecad-daily-python3
sudo apt-get install --reinstall freecad-daily-python3 
Got error

Code: Select all

/usr/bin/freecad-daily (freecad-daily) in auto mode
update-alternatives: warning: skip creation of /usr/lib/freecad-daily/lib because associated file /usr/lib/freecad-daily-python3/lib (of link group freecad-daily) doesn't exist
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: reinstall of freecad-daily

Post by openBrain »

Do an 'autoremove' then 'update' before you reinstall. ;)
Post Reply