0

I accidentally did apt-get remove python3. I tried sudo apt-get install ubuntu-desktop but it shows

The following packages have unmet dependencies:
 aptdaemon : Depends: python3-aptdaemon (= 1.1.1+bzr982-0ubuntu14.1) but 1.1.1+bzr982-0ubuntu14 is to be installed

Whatever solution i try it says the above error. Please someone help me.

EDIT I tried sudo -i python3-aptdaemon.deb.But it is showing

    /var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: 
    Too many levels of symbolic links dpkg: error processing archive 
    ./python3-aptdaemon.gtk3widgets_1.1.1+bzr982-0ubuntu14_all.deb (-install): subprocess new pre-removal script returned error exit status 2 
/var/lib/dpkg/info/python3-aptdaemon.gtk3widgets.postinst: 6: 
/var/lib/dpkg/info/python3-aptdaemon.gtk3widgets.postinst: py3compile: Too
 many levels of symbolic links

Whenever I try to install any .deb file it says

python3-all depends on python3 (= 3.5.1-3); however:
  Package python3 is not configured yet.
  • Check you have the xenial-updates in your sources (https://packages.ubuntu.com/search?suite=all§ion=all&arch=any&keywords=python3-aptdaemon&searchon=names) – guiverc Sep 17 '19 at 06:12
  • apt-get update --fix-missing Ref: http://www.iasptk.com/ubuntu-fix-broken-package-best-solution/ – EODCraft Staff Sep 17 '19 at 06:12
  • Thanks for the response @EODCraftStaff. I did it and it executed the code but still it shows aptdaemon : Depends: python3-aptdaemon (= 1.1.1+bzr982-0ubuntu14.1) but 1.1.1+bzr982-0ubuntu14 is to be installed when I do apt-get install ubuntu-desktop – user-2147482338 Sep 17 '19 at 06:23
  • Thanks for the response @guiverc. How do I install the updates? – user-2147482338 Sep 17 '19 at 06:24
  • There is a variety of those --fix-missing like install, none work? Ref: https://askubuntu.com/questions/462690/what-does-apt-get-fix-missing-do-and-when-is-it-useful/462751 – EODCraft Staff Sep 17 '19 at 06:29
  • 1
    Because you removed python3, tools that use or require it will have issues. I would use wget to download the .deb files you need and use dpkg to install them. This will mark them as manually installed, which if it worries you, you could always use apt-mark to reverse but I don't see that it matters. fyi: you may find yourself needing to wget multiple files to install (apt tools will do this for you automatically, dpkg won't) – guiverc Sep 17 '19 at 06:35
  • Iam new to ubuntu. please say the exact command to do it. – user-2147482338 Sep 17 '19 at 06:58
  • Google will teach you most Linux commands, it will take some effort on your part and you will become a better admin of your system for it. It may even help you avoid removing things you require in the future. – EODCraft Staff Sep 17 '19 at 07:00
  • But please help me. I am worried now. – user-2147482338 Sep 17 '19 at 07:10
  • I downloaded .deb file and did sudo dpkg -i /path/to/deb/file. But it shows /var/lib/dpkg/info/python3-aptdaemon.postinst: 6: /var/lib/dpkg/info/python3-aptdaemon.postinst: py3compile: Too many levels of symbolic links – user-2147482338 Sep 17 '19 at 07:29
  • Please don't add additional information in comments, it's hard to read & your last comment was 'hidden' by default (where you want it read - edit your question and put it there). If you're asking someone a specific question you need to tag them, as it's only chance I returned here. The "/path/to/deb/file" should have been replaced by your path and filename. Full commands & output are easier to read than snippets (and questions/answers allow formatting) – guiverc Sep 17 '19 at 07:52
  • @guiverc. Iam sorry. I tried the command and it shows /var/lib/dpkg/info/python3-aptdaemon.postinst: 6: /var/lib/dpkg/info/python3-aptdaemon.postinst: py3compile: Too many levels of symbolic links – user-2147482338 Sep 17 '19 at 08:12
  • 3

1 Answers1

0

Correction: apt-get does not require python, so you should be able to reinstall normally:

sudo apt-get install python3
sudo apt-get install python3-aptdaemon

apt dependencies:

Depends: adduser, gpgv | gpgv2 | gpgv1, ubuntu-keyring, libapt-pkg5.0 (>= 1.7.0~alpha3~), libc6 (>= 2.15), libgcc1 (>= 1:3.0), libgnutls30 (>= 3.6.5), libseccomp2 (>= 1.0.1), libstdc++6 (>= 5.2)

python3-aptdaemon dependencies:

Depends: python3:any (>= 3.2~), aptdaemon, gir1.2-glib-2.0, gir1.2-packagekitglib-1.0 (>= 1.1.1), python3-apt (>= 0.8.5~ubuntu1), python3-defer (>= 1.0.6), python3-dbus, python3-gi, python3-pkg-resources, iso-codes Filename: pool/main/a/aptdaemon/python3-aptdaemon_1.1.1+bzr982-0ubuntu21_all.deb

  • Thanks a lot Wayne. I tried install python3-aptdaemon. it is showing /var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: Too many levels of symbolic links dpkg: error processing archive ./python3-aptdaemon.gtk3widgets_1.1.1+bzr982-0ubuntu14_all.deb (--install): subprocess new pre-removal script returned error exit status 2 /var/lib/dpkg/info/python3-aptdaemon.gtk3widgets.postinst: 6: /var/lib/dpkg/info/python3-aptdaemon.gtk3widgets.postinst: py3compile: Too many levels of symbolic links – user-2147482338 Sep 17 '19 at 09:21
  • @Melebius. Now I added the outputs in my question. Please help me. – user-2147482338 Sep 17 '19 at 10:08
  • 1
    @Wayne Vosberg .Thanks a lot for your answers. I fixed it by removing the symbolic links and install ubuntu-desktop. – user-2147482338 Sep 17 '19 at 12:53
  • I still receive python3 is not yet configured. Do you any idea how to solve it? @Wayne Vosberg – user-2147482338 Sep 17 '19 at 14:50
  • sudo apt-get reinstall python3 or sudo dpkg-reconfigure python3 possibly. – Wayne Vosberg Sep 17 '19 at 15:30
  • Thanks @Wayne. It says /usr/sbin/dpkg-reconfigure: python3 is broken or not fully installed. – user-2147482338 Sep 17 '19 at 17:12