weird issue when installing packages
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom: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)
After EDIT
dpkg --configure -a
dpkg: error: requested operation requires superuser privilege
Setting up click (0.4.43+16.04.20170613-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 click (--configure):
subprocess installed post-installation script returned error exit
status 1
Setting up click-apparmor (0.3.13.1) ...
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 click-apparmor (--configure):
subprocess installed post-installation script returned error
exit status 1
Setting up url-dispatcher:amd64 (0.1+16.04.20151110-0ubuntu2) ...
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 url-dispatcher:amd64 (--
configure):
subprocess installed post-installation script returned error
exit status 1
dpkg: dependency problems prevent configuration of ubuntu-app-l
aunch:
ubuntu-app-launch depends on click-apparmor; however:
Package click-apparmor is not configured yet.
dpkg: error processing package ubuntu-app-launch (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-system-
settings:
ubuntu-system-settings depends on click | ubuntu-snappy-cli;
however:
Package click is not configured yet.
Package ubuntu-snappy-cli is not installed.
dpkg: error processing package ubuntu-system-settings (--
configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-app-
launch-tools:
ubuntu-app-launch-tools depends on ubuntu-app-launch (=
0.5+15.10.20150817-0ubuntu3); however:
Package ubuntu-app-launch is not configured yet.
dpkg: error processing package ubuntu-app-launch-tools (--
configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-system-
settings-online-accounts:
ubuntu-system-settings-online-accounts depends on ubuntu-system-
settings;
however:
Package ubuntu-system-settings is not configured yet.
dpkg: error processing package ubuntu-system-settings-online-
accounts (--
configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
click
click-apparmor
url-dispatcher:amd64
ubuntu-app-launch
ubuntu-system-settings
ubuntu-app-launch-tools
ubuntu-system-settings-online-accounts
History of commands i fired and everything went wrong after that
main culprits
sudo chown -R /usr/lib
sudo chown -R `id -un` /usr/lib
sudo chown -R `id -un` /usr/bin
other commands i did after the above
npm install -g vue-cli
sudo npm install -g vue-cli
chown root:root /usr/bin/sudo
sudo chown root:root /usr/bin/sudo
su root
chmod 644 /usr/lib/sudo/sudoers.so
chown -R root /usr/lib/sudo
sud ochown -R root /usr/lib/sudo
sudo chown -R root /usr/lib/sudo
pkexec su
sudo apt-get update
pkexec chmod u+s,g-x /usr/bin/sudo
sudo echo "sudo works again! Yay! :D"
sudo -s
su -
sudo -i
ls -ld /etc
pkexec chmod 755 -R /usr/lib
After that my wifi stopped working
sudo lshw -class network
sudo service network-manager restart
killall nm-applet && nm-applet &
sudo systemctl restart network-manager
sudo systemctl start network-manager
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
sudo apt-get install rfkill
rfkill unblock all
sudo nano /var/lib/NetworkManager/NetworkManager.state
rfkill list
sudo chown -R $USER /usr/lib/
chown -R root /usr/lib
sudo chown -R root /usr/lib
sudo
exit
pcd
cd
pkexec chmod 755 /etc
pkexec chmod 755 /usr/lib
After the my fonts in my desktop and everywhere becomes big
sudo apt install unity8-desktop-session-mir
sudo apt-get -f install
sudo apt install gnome-tweak-tool
sudo apt-get remove unity8
dpkg --configure -a
dpkg --configure -anapt autoremovenapt -f installnapt updatenapt
upgrade
sudo apt-get install -f
sudo apt autoremove
sudo rm /etc/apt/sources.list
sudo software-properties-gtk
sudo apt-get autoremove
apt-get -f install
sudo apt-get -f install
sudo apt-get clean
sudo apt-get update
sudo dpkg --audit | more
sudo dpkg --configure click click-apparmor
sudo dpkg --configure -a
sudo apt-get install -f
16.04 dpkg click-packages
add a comment |
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)
After EDIT
dpkg --configure -a
dpkg: error: requested operation requires superuser privilege
Setting up click (0.4.43+16.04.20170613-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 click (--configure):
subprocess installed post-installation script returned error exit
status 1
Setting up click-apparmor (0.3.13.1) ...
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 click-apparmor (--configure):
subprocess installed post-installation script returned error
exit status 1
Setting up url-dispatcher:amd64 (0.1+16.04.20151110-0ubuntu2) ...
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 url-dispatcher:amd64 (--
configure):
subprocess installed post-installation script returned error
exit status 1
dpkg: dependency problems prevent configuration of ubuntu-app-l
aunch:
ubuntu-app-launch depends on click-apparmor; however:
Package click-apparmor is not configured yet.
dpkg: error processing package ubuntu-app-launch (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-system-
settings:
ubuntu-system-settings depends on click | ubuntu-snappy-cli;
however:
Package click is not configured yet.
Package ubuntu-snappy-cli is not installed.
dpkg: error processing package ubuntu-system-settings (--
configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-app-
launch-tools:
ubuntu-app-launch-tools depends on ubuntu-app-launch (=
0.5+15.10.20150817-0ubuntu3); however:
Package ubuntu-app-launch is not configured yet.
dpkg: error processing package ubuntu-app-launch-tools (--
configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-system-
settings-online-accounts:
ubuntu-system-settings-online-accounts depends on ubuntu-system-
settings;
however:
Package ubuntu-system-settings is not configured yet.
dpkg: error processing package ubuntu-system-settings-online-
accounts (--
configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
click
click-apparmor
url-dispatcher:amd64
ubuntu-app-launch
ubuntu-system-settings
ubuntu-app-launch-tools
ubuntu-system-settings-online-accounts
History of commands i fired and everything went wrong after that
main culprits
sudo chown -R /usr/lib
sudo chown -R `id -un` /usr/lib
sudo chown -R `id -un` /usr/bin
other commands i did after the above
npm install -g vue-cli
sudo npm install -g vue-cli
chown root:root /usr/bin/sudo
sudo chown root:root /usr/bin/sudo
su root
chmod 644 /usr/lib/sudo/sudoers.so
chown -R root /usr/lib/sudo
sud ochown -R root /usr/lib/sudo
sudo chown -R root /usr/lib/sudo
pkexec su
sudo apt-get update
pkexec chmod u+s,g-x /usr/bin/sudo
sudo echo "sudo works again! Yay! :D"
sudo -s
su -
sudo -i
ls -ld /etc
pkexec chmod 755 -R /usr/lib
After that my wifi stopped working
sudo lshw -class network
sudo service network-manager restart
killall nm-applet && nm-applet &
sudo systemctl restart network-manager
sudo systemctl start network-manager
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
sudo apt-get install rfkill
rfkill unblock all
sudo nano /var/lib/NetworkManager/NetworkManager.state
rfkill list
sudo chown -R $USER /usr/lib/
chown -R root /usr/lib
sudo chown -R root /usr/lib
sudo
exit
pcd
cd
pkexec chmod 755 /etc
pkexec chmod 755 /usr/lib
After the my fonts in my desktop and everywhere becomes big
sudo apt install unity8-desktop-session-mir
sudo apt-get -f install
sudo apt install gnome-tweak-tool
sudo apt-get remove unity8
dpkg --configure -a
dpkg --configure -anapt autoremovenapt -f installnapt updatenapt
upgrade
sudo apt-get install -f
sudo apt autoremove
sudo rm /etc/apt/sources.list
sudo software-properties-gtk
sudo apt-get autoremove
apt-get -f install
sudo apt-get -f install
sudo apt-get clean
sudo apt-get update
sudo dpkg --audit | more
sudo dpkg --configure click click-apparmor
sudo dpkg --configure -a
sudo apt-get install -f
16.04 dpkg click-packages
1
Please, edit the question to include the output ofdpkg --configure -a
.
– Olimjon
Feb 10 at 6:49
1
Rather than 'did something', can you be more specific? If you did it via command, can't you provide the actual command (plus commands you used to try and fix it) - they should be in your bashhistory
. Whatever you did is likely to be your 'cure' to reversing it (unless you want to restore your backups).
– guiverc
Feb 10 at 7:13
add a comment |
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)
After EDIT
dpkg --configure -a
dpkg: error: requested operation requires superuser privilege
Setting up click (0.4.43+16.04.20170613-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 click (--configure):
subprocess installed post-installation script returned error exit
status 1
Setting up click-apparmor (0.3.13.1) ...
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 click-apparmor (--configure):
subprocess installed post-installation script returned error
exit status 1
Setting up url-dispatcher:amd64 (0.1+16.04.20151110-0ubuntu2) ...
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 url-dispatcher:amd64 (--
configure):
subprocess installed post-installation script returned error
exit status 1
dpkg: dependency problems prevent configuration of ubuntu-app-l
aunch:
ubuntu-app-launch depends on click-apparmor; however:
Package click-apparmor is not configured yet.
dpkg: error processing package ubuntu-app-launch (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-system-
settings:
ubuntu-system-settings depends on click | ubuntu-snappy-cli;
however:
Package click is not configured yet.
Package ubuntu-snappy-cli is not installed.
dpkg: error processing package ubuntu-system-settings (--
configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-app-
launch-tools:
ubuntu-app-launch-tools depends on ubuntu-app-launch (=
0.5+15.10.20150817-0ubuntu3); however:
Package ubuntu-app-launch is not configured yet.
dpkg: error processing package ubuntu-app-launch-tools (--
configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-system-
settings-online-accounts:
ubuntu-system-settings-online-accounts depends on ubuntu-system-
settings;
however:
Package ubuntu-system-settings is not configured yet.
dpkg: error processing package ubuntu-system-settings-online-
accounts (--
configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
click
click-apparmor
url-dispatcher:amd64
ubuntu-app-launch
ubuntu-system-settings
ubuntu-app-launch-tools
ubuntu-system-settings-online-accounts
History of commands i fired and everything went wrong after that
main culprits
sudo chown -R /usr/lib
sudo chown -R `id -un` /usr/lib
sudo chown -R `id -un` /usr/bin
other commands i did after the above
npm install -g vue-cli
sudo npm install -g vue-cli
chown root:root /usr/bin/sudo
sudo chown root:root /usr/bin/sudo
su root
chmod 644 /usr/lib/sudo/sudoers.so
chown -R root /usr/lib/sudo
sud ochown -R root /usr/lib/sudo
sudo chown -R root /usr/lib/sudo
pkexec su
sudo apt-get update
pkexec chmod u+s,g-x /usr/bin/sudo
sudo echo "sudo works again! Yay! :D"
sudo -s
su -
sudo -i
ls -ld /etc
pkexec chmod 755 -R /usr/lib
After that my wifi stopped working
sudo lshw -class network
sudo service network-manager restart
killall nm-applet && nm-applet &
sudo systemctl restart network-manager
sudo systemctl start network-manager
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
sudo apt-get install rfkill
rfkill unblock all
sudo nano /var/lib/NetworkManager/NetworkManager.state
rfkill list
sudo chown -R $USER /usr/lib/
chown -R root /usr/lib
sudo chown -R root /usr/lib
sudo
exit
pcd
cd
pkexec chmod 755 /etc
pkexec chmod 755 /usr/lib
After the my fonts in my desktop and everywhere becomes big
sudo apt install unity8-desktop-session-mir
sudo apt-get -f install
sudo apt install gnome-tweak-tool
sudo apt-get remove unity8
dpkg --configure -a
dpkg --configure -anapt autoremovenapt -f installnapt updatenapt
upgrade
sudo apt-get install -f
sudo apt autoremove
sudo rm /etc/apt/sources.list
sudo software-properties-gtk
sudo apt-get autoremove
apt-get -f install
sudo apt-get -f install
sudo apt-get clean
sudo apt-get update
sudo dpkg --audit | more
sudo dpkg --configure click click-apparmor
sudo dpkg --configure -a
sudo apt-get install -f
16.04 dpkg click-packages
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)
After EDIT
dpkg --configure -a
dpkg: error: requested operation requires superuser privilege
Setting up click (0.4.43+16.04.20170613-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 click (--configure):
subprocess installed post-installation script returned error exit
status 1
Setting up click-apparmor (0.3.13.1) ...
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 click-apparmor (--configure):
subprocess installed post-installation script returned error
exit status 1
Setting up url-dispatcher:amd64 (0.1+16.04.20151110-0ubuntu2) ...
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 url-dispatcher:amd64 (--
configure):
subprocess installed post-installation script returned error
exit status 1
dpkg: dependency problems prevent configuration of ubuntu-app-l
aunch:
ubuntu-app-launch depends on click-apparmor; however:
Package click-apparmor is not configured yet.
dpkg: error processing package ubuntu-app-launch (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-system-
settings:
ubuntu-system-settings depends on click | ubuntu-snappy-cli;
however:
Package click is not configured yet.
Package ubuntu-snappy-cli is not installed.
dpkg: error processing package ubuntu-system-settings (--
configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-app-
launch-tools:
ubuntu-app-launch-tools depends on ubuntu-app-launch (=
0.5+15.10.20150817-0ubuntu3); however:
Package ubuntu-app-launch is not configured yet.
dpkg: error processing package ubuntu-app-launch-tools (--
configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-system-
settings-online-accounts:
ubuntu-system-settings-online-accounts depends on ubuntu-system-
settings;
however:
Package ubuntu-system-settings is not configured yet.
dpkg: error processing package ubuntu-system-settings-online-
accounts (--
configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
click
click-apparmor
url-dispatcher:amd64
ubuntu-app-launch
ubuntu-system-settings
ubuntu-app-launch-tools
ubuntu-system-settings-online-accounts
History of commands i fired and everything went wrong after that
main culprits
sudo chown -R /usr/lib
sudo chown -R `id -un` /usr/lib
sudo chown -R `id -un` /usr/bin
other commands i did after the above
npm install -g vue-cli
sudo npm install -g vue-cli
chown root:root /usr/bin/sudo
sudo chown root:root /usr/bin/sudo
su root
chmod 644 /usr/lib/sudo/sudoers.so
chown -R root /usr/lib/sudo
sud ochown -R root /usr/lib/sudo
sudo chown -R root /usr/lib/sudo
pkexec su
sudo apt-get update
pkexec chmod u+s,g-x /usr/bin/sudo
sudo echo "sudo works again! Yay! :D"
sudo -s
su -
sudo -i
ls -ld /etc
pkexec chmod 755 -R /usr/lib
After that my wifi stopped working
sudo lshw -class network
sudo service network-manager restart
killall nm-applet && nm-applet &
sudo systemctl restart network-manager
sudo systemctl start network-manager
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
sudo apt-get install rfkill
rfkill unblock all
sudo nano /var/lib/NetworkManager/NetworkManager.state
rfkill list
sudo chown -R $USER /usr/lib/
chown -R root /usr/lib
sudo chown -R root /usr/lib
sudo
exit
pcd
cd
pkexec chmod 755 /etc
pkexec chmod 755 /usr/lib
After the my fonts in my desktop and everywhere becomes big
sudo apt install unity8-desktop-session-mir
sudo apt-get -f install
sudo apt install gnome-tweak-tool
sudo apt-get remove unity8
dpkg --configure -a
dpkg --configure -anapt autoremovenapt -f installnapt updatenapt
upgrade
sudo apt-get install -f
sudo apt autoremove
sudo rm /etc/apt/sources.list
sudo software-properties-gtk
sudo apt-get autoremove
apt-get -f install
sudo apt-get -f install
sudo apt-get clean
sudo apt-get update
sudo dpkg --audit | more
sudo dpkg --configure click click-apparmor
sudo dpkg --configure -a
sudo apt-get install -f
16.04 dpkg click-packages
16.04 dpkg click-packages
edited Feb 10 at 7:24
pawan kumar
asked Feb 10 at 6:28
pawan kumarpawan kumar
1064
1064
1
Please, edit the question to include the output ofdpkg --configure -a
.
– Olimjon
Feb 10 at 6:49
1
Rather than 'did something', can you be more specific? If you did it via command, can't you provide the actual command (plus commands you used to try and fix it) - they should be in your bashhistory
. Whatever you did is likely to be your 'cure' to reversing it (unless you want to restore your backups).
– guiverc
Feb 10 at 7:13
add a comment |
1
Please, edit the question to include the output ofdpkg --configure -a
.
– Olimjon
Feb 10 at 6:49
1
Rather than 'did something', can you be more specific? If you did it via command, can't you provide the actual command (plus commands you used to try and fix it) - they should be in your bashhistory
. Whatever you did is likely to be your 'cure' to reversing it (unless you want to restore your backups).
– guiverc
Feb 10 at 7:13
1
1
Please, edit the question to include the output of
dpkg --configure -a
.– Olimjon
Feb 10 at 6:49
Please, edit the question to include the output of
dpkg --configure -a
.– Olimjon
Feb 10 at 6:49
1
1
Rather than 'did something', can you be more specific? If you did it via command, can't you provide the actual command (plus commands you used to try and fix it) - they should be in your bash
history
. Whatever you did is likely to be your 'cure' to reversing it (unless you want to restore your backups).– guiverc
Feb 10 at 7:13
Rather than 'did something', can you be more specific? If you did it via command, can't you provide the actual command (plus commands you used to try and fix it) - they should be in your bash
history
. Whatever you did is likely to be your 'cure' to reversing it (unless you want to restore your backups).– guiverc
Feb 10 at 7:13
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
1
Please, edit the question to include the output of
dpkg --configure -a
.– Olimjon
Feb 10 at 6:49
1
Rather than 'did something', can you be more specific? If you did it via command, can't you provide the actual command (plus commands you used to try and fix it) - they should be in your bash
history
. Whatever you did is likely to be your 'cure' to reversing it (unless you want to restore your backups).– guiverc
Feb 10 at 7:13