weird issue when installing packages












0















I dont know what happened to my ubuntu 16.04 yesterday i did something with permission of /usr/lib and after that sudo was not working so i fixed sudo by going in recovery and using some command found in stackoverflow.



now i see some unknown errors that i dont know how to fix.



Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
libunity-scopes1.0
0 upgraded, 0 newly installed, 1 to remove and 19 not upgraded.
8 not fully installed or removed.
After this operation, 2,849 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 334690 files and directories currently
installed.)
Removing libunity-scopes1.0:amd64 (1.0.4+16.04.20160402.4-0ubuntu1)
...
Traceback (most recent call last):
File "/usr/bin/click", line 31, in <module>
import gi
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in
<module>
from . import _gi
ImportError: cannot import name '_gi'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63,
in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in
<module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in
<module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in
<module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line
23, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in
<module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
File "/usr/bin/click", line 31, in <module>
import gi
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in
<module>
from . import _gi
ImportError: cannot import name '_gi'
dpkg: error processing package libunity-scopes1.0:amd64 (--remove):
subprocess installed pre-removal script returned error exit status 1
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
libunity-scopes1.0:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)








share



























    0















    I dont know what happened to my ubuntu 16.04 yesterday i did something with permission of /usr/lib and after that sudo was not working so i fixed sudo by going in recovery and using some command found in stackoverflow.



    now i see some unknown errors that i dont know how to fix.



    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Correcting dependencies... Done
    The following packages will be REMOVED:
    libunity-scopes1.0
    0 upgraded, 0 newly installed, 1 to remove and 19 not upgraded.
    8 not fully installed or removed.
    After this operation, 2,849 kB disk space will be freed.
    Do you want to continue? [Y/n] y
    (Reading database ... 334690 files and directories currently
    installed.)
    Removing libunity-scopes1.0:amd64 (1.0.4+16.04.20160402.4-0ubuntu1)
    ...
    Traceback (most recent call last):
    File "/usr/bin/click", line 31, in <module>
    import gi
    File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in
    <module>
    from . import _gi
    ImportError: cannot import name '_gi'
    Error in sys.excepthook:
    Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63,
    in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
    File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in
    <module>
    from apport.report import Report
    File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in
    <module>
    import apport.fileutils
    File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in
    <module>
    from apport.packaging_impl import impl as packaging
    File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line
    23, in <module>
    import apt
    File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in
    <module>
    import apt_pkg
    ModuleNotFoundError: No module named 'apt_pkg'

    Original exception was:
    Traceback (most recent call last):
    File "/usr/bin/click", line 31, in <module>
    import gi
    File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in
    <module>
    from . import _gi
    ImportError: cannot import name '_gi'
    dpkg: error processing package libunity-scopes1.0:amd64 (--remove):
    subprocess installed pre-removal script returned error exit status 1
    Processing triggers for libc-bin (2.23-0ubuntu10) ...
    Errors were encountered while processing:
    libunity-scopes1.0:amd64
    E: Sub-process /usr/bin/dpkg returned an error code (1)








    share

























      0












      0








      0








      I dont know what happened to my ubuntu 16.04 yesterday i did something with permission of /usr/lib and after that sudo was not working so i fixed sudo by going in recovery and using some command found in stackoverflow.



      now i see some unknown errors that i dont know how to fix.



      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      Correcting dependencies... Done
      The following packages will be REMOVED:
      libunity-scopes1.0
      0 upgraded, 0 newly installed, 1 to remove and 19 not upgraded.
      8 not fully installed or removed.
      After this operation, 2,849 kB disk space will be freed.
      Do you want to continue? [Y/n] y
      (Reading database ... 334690 files and directories currently
      installed.)
      Removing libunity-scopes1.0:amd64 (1.0.4+16.04.20160402.4-0ubuntu1)
      ...
      Traceback (most recent call last):
      File "/usr/bin/click", line 31, in <module>
      import gi
      File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in
      <module>
      from . import _gi
      ImportError: cannot import name '_gi'
      Error in sys.excepthook:
      Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63,
      in apport_excepthook
      from apport.fileutils import likely_packaged, get_recent_crashes
      File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in
      <module>
      from apport.report import Report
      File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in
      <module>
      import apport.fileutils
      File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in
      <module>
      from apport.packaging_impl import impl as packaging
      File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line
      23, in <module>
      import apt
      File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in
      <module>
      import apt_pkg
      ModuleNotFoundError: No module named 'apt_pkg'

      Original exception was:
      Traceback (most recent call last):
      File "/usr/bin/click", line 31, in <module>
      import gi
      File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in
      <module>
      from . import _gi
      ImportError: cannot import name '_gi'
      dpkg: error processing package libunity-scopes1.0:amd64 (--remove):
      subprocess installed pre-removal script returned error exit status 1
      Processing triggers for libc-bin (2.23-0ubuntu10) ...
      Errors were encountered while processing:
      libunity-scopes1.0:amd64
      E: Sub-process /usr/bin/dpkg returned an error code (1)








      share














      I dont know what happened to my ubuntu 16.04 yesterday i did something with permission of /usr/lib and after that sudo was not working so i fixed sudo by going in recovery and using some command found in stackoverflow.



      now i see some unknown errors that i dont know how to fix.



      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      Correcting dependencies... Done
      The following packages will be REMOVED:
      libunity-scopes1.0
      0 upgraded, 0 newly installed, 1 to remove and 19 not upgraded.
      8 not fully installed or removed.
      After this operation, 2,849 kB disk space will be freed.
      Do you want to continue? [Y/n] y
      (Reading database ... 334690 files and directories currently
      installed.)
      Removing libunity-scopes1.0:amd64 (1.0.4+16.04.20160402.4-0ubuntu1)
      ...
      Traceback (most recent call last):
      File "/usr/bin/click", line 31, in <module>
      import gi
      File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in
      <module>
      from . import _gi
      ImportError: cannot import name '_gi'
      Error in sys.excepthook:
      Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63,
      in apport_excepthook
      from apport.fileutils import likely_packaged, get_recent_crashes
      File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in
      <module>
      from apport.report import Report
      File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in
      <module>
      import apport.fileutils
      File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in
      <module>
      from apport.packaging_impl import impl as packaging
      File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line
      23, in <module>
      import apt
      File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in
      <module>
      import apt_pkg
      ModuleNotFoundError: No module named 'apt_pkg'

      Original exception was:
      Traceback (most recent call last):
      File "/usr/bin/click", line 31, in <module>
      import gi
      File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in
      <module>
      from . import _gi
      ImportError: cannot import name '_gi'
      dpkg: error processing package libunity-scopes1.0:amd64 (--remove):
      subprocess installed pre-removal script returned error exit status 1
      Processing triggers for libc-bin (2.23-0ubuntu10) ...
      Errors were encountered while processing:
      libunity-scopes1.0:amd64
      E: Sub-process /usr/bin/dpkg returned an error code (1)






      16.04 dpkg click-packages





      share












      share










      share



      share










      asked 8 mins ago









      pawan kumarpawan kumar

      1064




      1064






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          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%2faskubuntu.com%2fquestions%2f1117070%2fweird-issue-when-installing-packages%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • 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%2faskubuntu.com%2fquestions%2f1117070%2fweird-issue-when-installing-packages%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

          GameSpot

          connect to host localhost port 22: Connection refused

          Getting a Wifi WPA2 wifi connection