Score:1

How to reinstall package ubuntu-advantage-tools

de flag

I tried to install FEniCS on Ubuntu 18.04.5 LTS with the following commands (from fenicsproject.org site):

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt-get update
sudo apt-get install fenics

The operations completed with an error:

Traceback (most recent call last):<br>
  File "\<string>", line 2, in \<module><br>
ModuleNotFoundError: No module named 'uaclient'<br>
dpkg: error processing package ubuntu-advantage-tools (--configure):<br>
installed ubuntu-advantage-tools package post-installation script subprocess returned error exit status 1<br>
Errors were encountered while processing:
 ubuntu-advantage-tools<br>
E: Sub-process /usr/bin/dpkg returned an error code (1)

In fact, executing:

dpkg --list | grep ubuntu-advantage-tools

I got:

iF ubuntu-advantage-tools 27.2.2~18.04.1 amd64 management tools for Ubuntu Advantage

It seems that the package is not copmpletely configurred. So I tried to reinstall it:

sudo apt-get install --reinstall ubuntu-advantage-tools

but it completed with an error:

E: Internal Error, No filename for ubuntu-advantage-tools:amd64

Finally I tried to purge the package and install it once more:

sudo apt-get purge ubuntu-advantage-tools

but it also didn't work:

Traceback (most recent call last):<br>
  File "\<string>", line 2, in \<module><br>
ModuleNotFoundError: No module named 'uaclient'<br>
dpkg: error processing package ubuntu-advantage-tools (--remove):<br>
installed ubuntu-advantage-tools package post-installation script subprocess returned error exit status 1<br>
Errors were encountered while processing:<br>
 ubuntu-advantage-tools<br>
E: Sub-process /usr/bin/dpkg returned an error code (1)

What is the reason of this behaviour and what should I do to get it working?

Nmath avatar
ng flag
Did you add the complete output of these commands or did you manipulate them for some reason? (Always include the full output) Is your other software up-to-date with no errors or pending updates when running `sudo apt update` followed by `sudo apt upgrade`?
ng flag
Does the command `python3 -c 'import uaclient'` complete successfully (silently), or do you get `ModuleNotFoundError`? If the latter, then it's likely to be your system Python installation that is broken. Did you try to modify your Python installation?
makopec avatar
de flag
Thank you for your answers. Nmath - In fact I did some manipulation with outputs, because I run commands on Linux, but for communication on askubuntu.com I use Windows. Of course I could copy the outputs to Windows, but instead of that I typed the outputs by hand. My fault. Another reason was that in my preview I had no line breaks so I had to insert them by hand. Maybe there is some better solution, but, as you see, it was my first mail, so I didn't find how to do it. As to update and upgrade - I did both commands (the output is long, so I do not include it), but it didn't help.
makopec avatar
de flag
Robie Basak - thank you for the hint. In fact, executing this command I got ModuleNotFoundError. But when I run the same with python3.7, everything was ok. My python3 is linked to python3.8, but I found that the module uaclient is taken from directory echo $PYTHONPATH
XavierStuvw avatar
cn flag
@RobieBasak Please convert your remark into an answer so that other users can build on it. Also a question with an answer attracts more users that have the same problem as the OP. Your contribution may help them.
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.