Results 1 to 14 of 14

Thread: DPKG Error when running Apt-Get Upgrade

  1. #1
    Join Date
    2017-Mar
    Posts
    18

    DPKG Error when running Apt-Get Upgrade

    Hey all. The title says it all. I've tried 4 different methods to fix this issue and can't seem to figure it out. Here is the output:

    root@Kali:~# apt-get upgrade
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Calculating upgrade... Done
    The following packages will be REMOVED:
    libglade2.0-cil libglib2.0-cil libgtk2.0-cil
    0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
    3 not fully installed or removed.
    After this operation, 2,942 kB disk space will be freed.
    Do you want to continue? [Y/n] y
    (Reading database ... 316070 files and directories currently installed.)
    Removing libglade2.0-cil (2.12.40-2) ...
    E: File does not exist: /usr/share/cli-common/packages.d/policy.2.4.glade-sharp.installcligac
    dpkg: error processing package libglade2.0-cil (--remove):
    subprocess installed post-removal script returned error exit status 1
    Removing libgtk2.0-cil (2.12.40-2) ...
    E: File does not exist: /usr/share/cli-common/packages.d/policy.2.4.pango-sharp.installcligac
    dpkg: error processing package libgtk2.0-cil (--remove):
    subprocess installed post-removal script returned error exit status 1
    Removing libglib2.0-cil (2.12.40-2) ...
    E: File does not exist: /usr/share/cli-common/packages.d/policy.2.6.glib-sharp.installcligac
    dpkg: error processing package libglib2.0-cil (--remove):
    subprocess installed post-removal script returned error exit status 1
    Errors were encountered while processing:
    libglade2.0-cil
    libgtk2.0-cil
    libglib2.0-cil
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    I'm not sure if this will have any effect on my system or not but I haven't run into this error before. I actually haven't even booted into Kali in over a month (dual-booted with Win 10 Pro on this laptop) which is why I was running updates/upgrades. Any ideas? I've tried apt-get remove --purge "x" "x" "x", apt-get update --fix-missing, apt-get clean && apt-get update && apt-get dist-upgrade, dpkg --remove "x" "x" "x", etc. You get the idea. What am I missing and how did this happen? Any help would be appreciated.

  2. #2
    Join Date
    2013-Apr
    Location
    Kali forums
    Posts
    805
    The output in /var/log may provide some clues as to what happened, if you can pin down a date range when Kali was last working.

    In terms of a fix, try apt install kali-linux-full. While it's a rather brutish method, that should resolve missing dependencies.

  3. #3
    Join Date
    2017-Mar
    Posts
    18
    Quote Originally Posted by grid View Post
    The output in /var/log may provide some clues as to what happened, if you can pin down a date range when Kali was last working.

    In terms of a fix, try apt install kali-linux-full. While it's a rather brutish method, that should resolve missing dependencies.
    I'll check out the log. Kali was working fine last time I booted into it, although I didn't run any updates/upgrades. The system runs fine, was just trying to understand why this is happening. I'll give that command a shot. Thanks.

    UPDATE:
    Didn't work. Output:

    root@Kali:~# apt install kali-linux-full
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    kali-linux-full is already the newest version (2017.1.5).
    The following packages will be REMOVED:
    libglade2.0-cil libglib2.0-cil libgtk2.0-cil
    0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
    3 not fully installed or removed.
    After this operation, 2,942 kB disk space will be freed.
    Do you want to continue? [Y/n] y
    (Reading database ... 316070 files and directories currently installed.)
    Removing libglade2.0-cil (2.12.40-2) ...
    E: File does not exist: /usr/share/cli-common/packages.d/policy.2.4.glade-sharp.installcligac
    dpkg: error processing package libglade2.0-cil (--remove):
    subprocess installed post-removal script returned error exit status 1
    Removing libgtk2.0-cil (2.12.40-2) ...
    E: File does not exist: /usr/share/cli-common/packages.d/policy.2.4.pango-sharp.installcligac
    dpkg: error processing package libgtk2.0-cil (--remove):
    subprocess installed post-removal script returned error exit status 1
    Removing libglib2.0-cil (2.12.40-2) ...
    E: File does not exist: /usr/share/cli-common/packages.d/policy.2.6.glib-sharp.installcligac
    dpkg: error processing package libglib2.0-cil (--remove):
    subprocess installed post-removal script returned error exit status 1
    Errors were encountered while processing:
    libglade2.0-cil
    libgtk2.0-cil
    libglib2.0-cil
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    Last edited by maiki; 2017-05-06 at 07:50.

  4. #4
    Join Date
    2016-Oct
    Location
    /dev/sda
    Posts
    1,012
    Repositories might be incorrect.
    cat /etc/apt/sources.list

  5. #5
    Join Date
    2017-Mar
    Posts
    18
    Quote Originally Posted by _defalt View Post
    Repositories might be incorrect.
    cat /etc/apt/sources.list
    I have already checked my sources.list and everything is as it should be.

  6. #6
    Join Date
    2016-Oct
    Location
    /dev/sda
    Posts
    1,012
    Run apt-get autoremove & apt-get autoclean

  7. #7
    Join Date
    2017-Mar
    Posts
    18
    Quote Originally Posted by _defalt View Post
    Run apt-get autoremove & apt-get autoclean
    Already been done.

    Edit: Sorry, _default, I ran commands very similar to that but not those exact ones and I'm not sure if I did them simultaneously. Here is the output of those commands:

    root@Kali:~# apt-get autoremove & apt-get autoclean
    [1] 1512
    Reading package lists... Done

    Building dependency tree
    Building dependency tree
    Reading state information... Done

    root@Kali:~# The following packages will be REMOVED:
    libglade2.0-cil libglib2.0-cil libgtk2.0-cil
    0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
    3 not fully installed or removed.
    After this operation, 2,942 kB disk space will be freed.
    Do you want to continue? [Y/n] Y
    bash: Y: command not found

    [1]+ Stopped apt-get autoremove
    Last edited by Bsullivan1983; 2017-05-06 at 23:56. Reason: update previous post

  8. #8
    Join Date
    2017-Mar
    Posts
    18
    Tried using the "locate" command for one of the packages it says is missing. Output is as follows-

    root@Kali:~# locate policy.2.6.glib-sharp.installcligac
    /usr/share/cli-common/packages.d/policy.2.6.glib-sharp.installcligac

    When I browse to that directory, the file is non-existent. It's the same with the other 2. I tried removing anyway and no luck.

    root@Kali:/usr/share/cli-common/packages.d# ls
    libnunit-console-runner2.6.3-cil.installcligac policy.2.6.nunit-console-runner.installcligac
    libnunit-console-runner2.6.3-cil.mono policy.2.6.nunit-console-runner.mono
    libnunit-core2.6.3-cil.installcligac policy.2.6.nunit.core.installcligac
    libnunit-core2.6.3-cil.mono policy.2.6.nunit.core.interfaces.installcligac
    libnunit-core-interfaces2.6.3-cil.installcligac policy.2.6.nunit.core.interfaces.mono
    libnunit-core-interfaces2.6.3-cil.mono policy.2.6.nunit.core.mono
    libnunit-framework2.6.3-cil.installcligac policy.2.6.nunit.framework.installcligac
    libnunit-framework2.6.3-cil.mono policy.2.6.nunit.framework.mono
    libnunit-mocks2.6.3-cil.installcligac policy.2.6.nunit.mocks.installcligac
    libnunit-mocks2.6.3-cil.mono policy.2.6.nunit.mocks.mono
    libnunit-util2.6.3-cil.installcligac policy.2.6.nunit.util.installcligac
    libnunit-util2.6.3-cil.mono policy.2.6.nunit.util.mono
    root@Kali:/usr/share/cli-common/packages.d# rm policy.2.6.glib-sharp.installcligac
    rm: cannot remove 'policy.2.6.glib-sharp.installcligac': No such file or directory
    Last edited by Bsullivan1983; 2017-05-08 at 00:16. Reason: updating post with more information

  9. #9
    Join Date
    2016-Oct
    Location
    /dev/sda
    Posts
    1,012
    Run apt-get autoremove && apt-get autoclean again. Last time you typed only one &.

  10. #10
    Join Date
    2017-Mar
    Posts
    18
    Quote Originally Posted by _defalt View Post
    Run apt-get autoremove && apt-get autoclean again. Last time you typed only one &.
    I assumed it was &&, but when you wrote the command out in your last post you only included one & so I followed that. I just ran it again using && and still getting same output.

  11. #11
    Join Date
    2016-Oct
    Location
    /dev/sda
    Posts
    1,012
    Show the output of cat /etc/apt/sources.list

  12. #12
    Join Date
    2017-Mar
    Posts
    18
    Quote Originally Posted by _defalt View Post
    Show the output of cat /etc/apt/sources.list
    root@Kali:~# cat /etc/apt/sources.list
    deb http://http.kali.org/kali kali-rolling main contrib non-free
    deb-src http://http.kali.org/kali kali-rolling main contrib non-free

  13. #13
    Join Date
    2016-Oct
    Location
    /dev/sda
    Posts
    1,012
    Comment out the second entry of repository as:
    #deb-src http://http.kali.org/kali kali-rolling main contrib non-free

    Then try again.

  14. #14
    Join Date
    2017-Mar
    Posts
    18
    Quote Originally Posted by _defalt View Post
    Comment out the second entry of repository as:
    #deb-src http://http.kali.org/kali kali-rolling main contrib non-free

    Then try again.
    Weird. Not sure how that line became non-commented. Either way, still no luck. Getting the same output.

Similar Threads

  1. apt-get upgrade returns dpkg error
    By cbaine in forum TroubleShooting Archive
    Replies: 3
    Last Post: 2017-06-04, 22:12
  2. Dradis and DPKG error during apt dist-upgrade
    By Sagaryal in forum TroubleShooting Archive
    Replies: 3
    Last Post: 2017-05-17, 04:37
  3. Replies: 3
    Last Post: 2015-09-21, 03:03

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •