apt-get gives “Sub-process /usr/bin/dpkg returned an error code”











up vote
0
down vote

favorite












So I was trying to install Cython on my Debian machine, and in the installation it gave me the error code:



 Sub-process /usr/bin/dpkg returned an error code (1)


Now as the pure blooded professional student that I am, after just waking up, I didnt think more of it, and thought Id look at it better later. However now when trying to install anything, or update, apt-get gives me the following



Errors were encountered while processing:
cython
E: Sub-process /usr/bin/dpkg returned an error code (1)


sudo dpkg --configure -a gives the following



Setting up cython (0.25.2-1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr,
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package cython (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
cython


sudo apt-get install -f



Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 30 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up cython (0.25.2-1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr,
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package cython (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
cython
E: Sub-process /usr/bin/dpkg returned an error code (1)


cat /etc/apt/sources.list



#------------------------------------------------------------------------------#
# OFFICIAL DEBIAN REPOS
#------------------------------------------------------------------------------#

###### Debian Main Repos
deb http://deb.debian.org/debian/ stable main contrib
deb-src http://deb.debian.org/debian/ stable main contrib

deb http://deb.debian.org/debian/ stable-updates main contrib
deb-src http://deb.debian.org/debian/ stable-updates main contrib

deb http://deb.debian.org/debian-security stable/updates main
deb-src http://deb.debian.org/debian-security stable/updates main

deb http://ftp.debian.org/debian stretch-backports main
deb-src http://ftp.debian.org/debian stretch-backports main









share|improve this question






















  • I think the relevant part is `ImportError: No module named 'ConfigParser' maybe this comment might help?
    – Stefan M
    Feb 23 at 10:32










  • Does sudo dpkg -C output anything?
    – Stephen Kitt
    Feb 23 at 10:48










  • @StefanM Yes, it did indeed help, I had to change my Python version back to 2.7, then run sudo apt purge cython. Thank you!
    – Aleksi Väisänen
    Feb 23 at 13:55















up vote
0
down vote

favorite












So I was trying to install Cython on my Debian machine, and in the installation it gave me the error code:



 Sub-process /usr/bin/dpkg returned an error code (1)


Now as the pure blooded professional student that I am, after just waking up, I didnt think more of it, and thought Id look at it better later. However now when trying to install anything, or update, apt-get gives me the following



Errors were encountered while processing:
cython
E: Sub-process /usr/bin/dpkg returned an error code (1)


sudo dpkg --configure -a gives the following



Setting up cython (0.25.2-1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr,
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package cython (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
cython


sudo apt-get install -f



Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 30 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up cython (0.25.2-1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr,
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package cython (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
cython
E: Sub-process /usr/bin/dpkg returned an error code (1)


cat /etc/apt/sources.list



#------------------------------------------------------------------------------#
# OFFICIAL DEBIAN REPOS
#------------------------------------------------------------------------------#

###### Debian Main Repos
deb http://deb.debian.org/debian/ stable main contrib
deb-src http://deb.debian.org/debian/ stable main contrib

deb http://deb.debian.org/debian/ stable-updates main contrib
deb-src http://deb.debian.org/debian/ stable-updates main contrib

deb http://deb.debian.org/debian-security stable/updates main
deb-src http://deb.debian.org/debian-security stable/updates main

deb http://ftp.debian.org/debian stretch-backports main
deb-src http://ftp.debian.org/debian stretch-backports main









share|improve this question






















  • I think the relevant part is `ImportError: No module named 'ConfigParser' maybe this comment might help?
    – Stefan M
    Feb 23 at 10:32










  • Does sudo dpkg -C output anything?
    – Stephen Kitt
    Feb 23 at 10:48










  • @StefanM Yes, it did indeed help, I had to change my Python version back to 2.7, then run sudo apt purge cython. Thank you!
    – Aleksi Väisänen
    Feb 23 at 13:55













up vote
0
down vote

favorite









up vote
0
down vote

favorite











So I was trying to install Cython on my Debian machine, and in the installation it gave me the error code:



 Sub-process /usr/bin/dpkg returned an error code (1)


Now as the pure blooded professional student that I am, after just waking up, I didnt think more of it, and thought Id look at it better later. However now when trying to install anything, or update, apt-get gives me the following



Errors were encountered while processing:
cython
E: Sub-process /usr/bin/dpkg returned an error code (1)


sudo dpkg --configure -a gives the following



Setting up cython (0.25.2-1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr,
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package cython (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
cython


sudo apt-get install -f



Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 30 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up cython (0.25.2-1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr,
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package cython (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
cython
E: Sub-process /usr/bin/dpkg returned an error code (1)


cat /etc/apt/sources.list



#------------------------------------------------------------------------------#
# OFFICIAL DEBIAN REPOS
#------------------------------------------------------------------------------#

###### Debian Main Repos
deb http://deb.debian.org/debian/ stable main contrib
deb-src http://deb.debian.org/debian/ stable main contrib

deb http://deb.debian.org/debian/ stable-updates main contrib
deb-src http://deb.debian.org/debian/ stable-updates main contrib

deb http://deb.debian.org/debian-security stable/updates main
deb-src http://deb.debian.org/debian-security stable/updates main

deb http://ftp.debian.org/debian stretch-backports main
deb-src http://ftp.debian.org/debian stretch-backports main









share|improve this question













So I was trying to install Cython on my Debian machine, and in the installation it gave me the error code:



 Sub-process /usr/bin/dpkg returned an error code (1)


Now as the pure blooded professional student that I am, after just waking up, I didnt think more of it, and thought Id look at it better later. However now when trying to install anything, or update, apt-get gives me the following



Errors were encountered while processing:
cython
E: Sub-process /usr/bin/dpkg returned an error code (1)


sudo dpkg --configure -a gives the following



Setting up cython (0.25.2-1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr,
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package cython (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
cython


sudo apt-get install -f



Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 30 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up cython (0.25.2-1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr,
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package cython (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
cython
E: Sub-process /usr/bin/dpkg returned an error code (1)


cat /etc/apt/sources.list



#------------------------------------------------------------------------------#
# OFFICIAL DEBIAN REPOS
#------------------------------------------------------------------------------#

###### Debian Main Repos
deb http://deb.debian.org/debian/ stable main contrib
deb-src http://deb.debian.org/debian/ stable main contrib

deb http://deb.debian.org/debian/ stable-updates main contrib
deb-src http://deb.debian.org/debian/ stable-updates main contrib

deb http://deb.debian.org/debian-security stable/updates main
deb-src http://deb.debian.org/debian-security stable/updates main

deb http://ftp.debian.org/debian stretch-backports main
deb-src http://ftp.debian.org/debian stretch-backports main






debian apt






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 23 at 10:10









Aleksi Väisänen

12




12












  • I think the relevant part is `ImportError: No module named 'ConfigParser' maybe this comment might help?
    – Stefan M
    Feb 23 at 10:32










  • Does sudo dpkg -C output anything?
    – Stephen Kitt
    Feb 23 at 10:48










  • @StefanM Yes, it did indeed help, I had to change my Python version back to 2.7, then run sudo apt purge cython. Thank you!
    – Aleksi Väisänen
    Feb 23 at 13:55


















  • I think the relevant part is `ImportError: No module named 'ConfigParser' maybe this comment might help?
    – Stefan M
    Feb 23 at 10:32










  • Does sudo dpkg -C output anything?
    – Stephen Kitt
    Feb 23 at 10:48










  • @StefanM Yes, it did indeed help, I had to change my Python version back to 2.7, then run sudo apt purge cython. Thank you!
    – Aleksi Väisänen
    Feb 23 at 13:55
















I think the relevant part is `ImportError: No module named 'ConfigParser' maybe this comment might help?
– Stefan M
Feb 23 at 10:32




I think the relevant part is `ImportError: No module named 'ConfigParser' maybe this comment might help?
– Stefan M
Feb 23 at 10:32












Does sudo dpkg -C output anything?
– Stephen Kitt
Feb 23 at 10:48




Does sudo dpkg -C output anything?
– Stephen Kitt
Feb 23 at 10:48












@StefanM Yes, it did indeed help, I had to change my Python version back to 2.7, then run sudo apt purge cython. Thank you!
– Aleksi Väisänen
Feb 23 at 13:55




@StefanM Yes, it did indeed help, I had to change my Python version back to 2.7, then run sudo apt purge cython. Thank you!
– Aleksi Väisänen
Feb 23 at 13:55










1 Answer
1






active

oldest

votes

















up vote
1
down vote













To unblock apt, you’ll need to remove the cython package:



sudo apt purge cython


Fixing the cython installation is likely to be a bit more involved (see the question comments).






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f426067%2fapt-get-gives-sub-process-usr-bin-dpkg-returned-an-error-code%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    To unblock apt, you’ll need to remove the cython package:



    sudo apt purge cython


    Fixing the cython installation is likely to be a bit more involved (see the question comments).






    share|improve this answer

























      up vote
      1
      down vote













      To unblock apt, you’ll need to remove the cython package:



      sudo apt purge cython


      Fixing the cython installation is likely to be a bit more involved (see the question comments).






      share|improve this answer























        up vote
        1
        down vote










        up vote
        1
        down vote









        To unblock apt, you’ll need to remove the cython package:



        sudo apt purge cython


        Fixing the cython installation is likely to be a bit more involved (see the question comments).






        share|improve this answer












        To unblock apt, you’ll need to remove the cython package:



        sudo apt purge cython


        Fixing the cython installation is likely to be a bit more involved (see the question comments).







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 23 at 10:47









        Stephen Kitt

        159k24354430




        159k24354430






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f426067%2fapt-get-gives-sub-process-usr-bin-dpkg-returned-an-error-code%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Accessing regular linux commands in Huawei's Dopra Linux

            Can't connect RFCOMM socket: Host is down

            Kernel panic - not syncing: Fatal Exception in Interrupt