command not found: sudo

After reading about the lately discovered vulnerability with sudo, I decided to update to 1.8.28 manually. I downloaded deb file from sudo.ws and used dpkg to install it, and it failed due to lack of dependencies.

sudo dpkg -i debs/sudo_1.8.28-1_ubu1804_i386.deb  (Reading database ... 232031 files and directories currently installed.) Preparing to unpack .../sudo_1.8.28-1_ubu1804_i386.deb ... Unpacking sudo:i386 (1.8.28-1) over (1.8.27-1ubuntu1.1) ... dpkg: dependency problems prevent configuration of sudo:i386: sudo:i386 depends on libc6. sudo:i386 depends on libpam0g. sudo:i386 depends on libpam-modules. sudo:i386 depends on zlib1g. sudo:i386 depends on libselinux1. sudo:i386 depends on libaudit1.  dpkg: error processing package sudo:i386 (--install): dependency problems - leaving unconfigured Processing triggers for man-db (2.8.5-2) ... Errors were encountered while processing: sudo:i386 

After that I can’t call sudo any more and it seems to be damaged cause I can locate it in /usr/bin/sudo:

l /usr/bin/sudo -rwsr-xr-x 1 root root 479K Oct 10 20:15 /usr/bin/sudo 

Since there is no Root user available on Ubuntu I was wondering if there is any solution other than rebooting as root in recovery mode?

how to update sudo package version

with the news of the vulnerability found in sudo versions prior to 1.8.28, I am trying to upgrade to that version, but have had no luck. I did sudo apt-get update and sudo apt-get upgrade and sudo continues to be at the same version. Even tried sudo apt-get upgrade sudo and it says it’s at the latest, which cannot be entirely true since 1.8.28 was released earlier today.

How does one typically go about updating packages using apt-get to latest versions?

Sudo Error: Access Denied

I type sudo into the command line and it says this, it also says that when running any command with sudo:

exquisitetoast@toastypc:~$ sudo sudo: unable to stat /etc/sudoers: Permission denied sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin exquisitetoast@toastypc:~$

Im runnning Ubuntu 19.0.4 with no dual-boot

arecord and sudo

Please help me

i try using arecord for record voice from mic

arecord -f S16_LE -N -t wav -c1 -r 22050 --max-file-time=5 --use-strftime /home/sergey/arec/files/%Y-%m-%d-%H-%M-%v.wav 

work success!

normal file

but when i run as sudo

sudo arecord -f S16_LE -N -t wav -c1 -r 22050 --max-file-time=5 --use-strftime /home/sergey/arec/files/%Y-%m-%d-%H-%M-%v.wav 

file is empty!! Why!?? sudo cant use arecored?? wtf!

empty file

How Can I Make A .desktop Launcher For A Sudo command To Execute GfxTablet Program?

I am new here been trying to find a way to make a .desktop icon for the sudo command to open the program called GfxTablet but cannot get any info that actually works.

All the plethera of commands I have tried fail to launch tilix terminal and or input a command, I have made lots of .desktop files launching programs them selves but never for a command line to be executed in sudo or none sudo.

All I know is the Exec line has to be precise in what it dictates to perform the operation. If I try to launch the default terminal as in typing the Exec line to state Exec=tilix nothing happens at all, but if I go into say UXterm and type tilix then hit enter it opens, I tried changing the default terminal to one of 3 or 4 terminals on this build of disco dingo 19.04, but none launch from the Exec= line if it includes the folder location followed by the file name when I am writing the .desktop launcher.

I am making it executable and running via right click open with Run Software option and also even dragging the .desktop file into tilix and hitting enter.

The file I want to launch I don’t know what file type it is or how to find that file type extension name, as I have done properties via right click which gives no name for file type there, or right clicking choosing the option to look at it’s location to see it’s path also gives no indication for a file extension.

The path to the file I want to make this .desktop launcher for is as follows:

/home/pc/GfxTablet/driver-input/networktablet

The file name I need to launch is as follows:

networktablet

launching the application which works in all terminals if typed in the command for launchin it is as follows:

sudo ./networktablet

I have been at this 36 hrs plus now trying to figure it out I had been getting some intermittent help online but that failed, it’s driving me crazy, I want it to add the icon to the docky dock, as I am making my own customized distribution.

But I would like to transfer it to other machines if necissary at some stage when customized fully, so I need it to be saved when completed as a systemback backup to do that the easy way with everything as is ready to go, I want it on the dock when re-installing or installing to any machine and the ease of accessing it on any machine from the dock by simply clicking a icon for it as aposed to typing it in to launch all the time through a terminal I have to click and open first, the same for if I wish to add further commandlines to open one click instead of open a command shell then type it in, I would like to have them in the app search as well meaning they need to be a .desktop file in the .local/share/applications folder that much I have learned with making other launchers.

Please can someone help I am very new to linux as in days but am good with windows not so much in commandline but anything else, I just switched os’s for good I prefer the security and the speed and fluidity of the ubuntu os.

I’m hoping for some help to come, so I can keep my hair as it is before I pull it all out lol

Thanks in advance

Cannot install anything? And cannot run ‘sudo apt-get update –fix-missing’ either?

I’ve installed ubuntu 19.04 in my laptop (Asus K501U): enter image description here

And there’s something not working properly. For some reason I cannot drag and drop files from or to my desktop (I need to cut whatever file or folder and manually paste it in the Desktop or out of it), and sometimes I cannot unselect any icon that I’ve selected. I need to press esc key several times and sometimes reboot the computer.

Now the latest issue is that I cannot install anything out of the software center.

I’ve downloaded XnRetro, and as you can see the XnRetro file that should be an executable does not have the proper icon. enter image description here

Anyway, if I click it nothing happens. And if I try to manually set a program to open it, nothing happens.

I’ve tried other options, and in all cases… it does nothing.

enter image description here

What’s going on? What can I do?

Please note that before posting it here, I’ve tried fixing anything that might be broken (even if it’s a fresh install). So, I’ve tried: After trying

sudo apt-get update –fix-missing 

reply: The update command takes no arguments

sudo dpkg –configure -a 

reply: dpkg: error: need an action option

sudo apt-get install -f 

reply: Reading package lists… Done Building dependency tree Reading state information… Done 0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.

If I click on “check for updates” button, I get this GNOME error: enter image description here

sudo apt purge emacs* removed ubuntu-desktop, shotwell etc

I wanted to do a fresh install of emacs so I tried to uninstall everything related to emacs using

sudo apt purge emacs*

Here is the output

$   sudo apt purge emacs* Reading package lists... Done Building dependency tree        Reading state information... Done Note, selecting 'emacsen' for glob 'emacs*' Note, selecting 'emacs-snapshot-nonx' for glob 'emacs*' Note, selecting 'emacs-calfw-howm' for glob 'emacs*' Note, selecting 'emacs24-lucid' for glob 'emacs*' Note, selecting 'emacspeak-espeak-server' for glob 'emacs*' Note, selecting 'emacs25-dbg' for glob 'emacs*' Note, selecting 'emacspeak' for glob 'emacs*' Note, selecting 'emacs-snapshot' for glob 'emacs*' Note, selecting 'emacs25-lucid' for glob 'emacs*' Note, selecting 'emacs-goodies-el' for glob 'emacs*' Note, selecting 'emacs22-common' for glob 'emacs*' Note, selecting 'emacs25-nox' for glob 'emacs*' Note, selecting 'emacs25-nox-dbg' for glob 'emacs*' Note, selecting 'emacs-jabber' for glob 'emacs*' Note, selecting 'emacs23-nox' for glob 'emacs*' Note, selecting 'emacs25-bin-common' for glob 'emacs*' Note, selecting 'emacs25-common' for glob 'emacs*' Note, selecting 'emacs-intl-fonts' for glob 'emacs*' Note, selecting 'emacs-mozc' for glob 'emacs*' Note, selecting 'emacspeak-bs-tcl' for glob 'emacs*' Note, selecting 'emacsen-common' for glob 'emacs*' Note, selecting 'emacs-nox' for glob 'emacs*' Note, selecting 'emacs25-common-non-dfsg' for glob 'emacs*' Note, selecting 'emacs' for glob 'emacs*' Note, selecting 'emacs25-el' for glob 'emacs*' Note, selecting 'emacs-window-layout' for glob 'emacs*' Note, selecting 'emacs-mozc-bin' for glob 'emacs*' Note, selecting 'emacs-chess' for glob 'emacs*' Note, selecting 'emacs23-lucid' for glob 'emacs*' Note, selecting 'emacs-snapshot-gtk' for glob 'emacs*' Note, selecting 'emacs25-lucid-dbg' for glob 'emacs*' Note, selecting 'emacs24-nox' for glob 'emacs*' Note, selecting 'emacs24-bin-common' for glob 'emacs*' Note, selecting 'emacs-goodies-extra-el' for glob 'emacs*' Note, selecting 'emacspeak-dt-tcl' for glob 'emacs*' Note, selecting 'emacs20' for glob 'emacs*' Note, selecting 'emacs21' for glob 'emacs*' Note, selecting 'emacs22' for glob 'emacs*' Note, selecting 'emacs23' for glob 'emacs*' Note, selecting 'emacs24' for glob 'emacs*' Note, selecting 'emacs25' for glob 'emacs*' Note, selecting 'emacs26' for glob 'emacs*' Note, selecting 'emacs-calfw' for glob 'emacs*' Note, selecting 'emacspeak-dt' for glob 'emacs*' Note, selecting 'emacspeak-ss' for glob 'emacs*' Package 'emacs24' is not installed, so not removed Package 'emacs-snapshot' is not installed, so not removed Note, selecting 'emacs-goodies-el' instead of 'emacs-goodies-extra-el' Package 'emacs26' is not installed, so not removed Package 'emacs23' is not installed, so not removed Package 'emacs20' is not installed, so not removed Package 'emacs21' is not installed, so not removed Package 'emacs22' is not installed, so not removed Package 'emacspeak-bs-tcl' is not installed, so not removed Package 'emacspeak-dt' is not installed, so not removed Package 'emacspeak-dt-tcl' is not installed, so not removed Package 'emacs-chess' is not installed, so not removed Package 'emacs24-bin-common' is not installed, so not removed Package 'emacs24-lucid' is not installed, so not removed Package 'emacs24-nox' is not installed, so not removed Package 'emacs22-common' is not installed, so not removed Package 'emacs23-nox' is not installed, so not removed Package 'emacs23-lucid' is not installed, so not removed Package 'emacs-snapshot-gtk' is not installed, so not removed Package 'emacs-snapshot-nonx' is not installed, so not removed Package 'emacs' is not installed, so not removed Package 'emacs-goodies-el' is not installed, so not removed Package 'emacs25' is not installed, so not removed Package 'emacs25-dbg' is not installed, so not removed Package 'emacs25-lucid-dbg' is not installed, so not removed Package 'emacs25-nox' is not installed, so not removed Package 'emacs25-nox-dbg' is not installed, so not removed Package 'emacs-calfw' is not installed, so not removed Package 'emacs-calfw-howm' is not installed, so not removed Package 'emacs-intl-fonts' is not installed, so not removed Package 'emacs-jabber' is not installed, so not removed Package 'emacs-nox' is not installed, so not removed Package 'emacs-window-layout' is not installed, so not removed Package 'emacspeak' is not installed, so not removed Package 'emacspeak-espeak-server' is not installed, so not removed Package 'emacspeak-ss' is not installed, so not removed Package 'emacs25-common-non-dfsg' is not installed, so not removed Package 'emacs-mozc' is not installed, so not removed Package 'emacs-mozc-bin' is not installed, so not removed The following packages were automatically installed and are no longer required:   activity-log-manager libgeonames-common libgeonames0 liblockfile-bin liblockfile1 libm17n-0 libnm-gtk0 libotf0   libtimezonemap-data libtimezonemap1 libunity-control-center1 m17n-db xaw3dg Use 'sudo apt autoremove' to remove them. The following packages will be REMOVED:   apturl* aspell* aspell-en* chrome-gnome-shell* deja-dup* dictionaries-common* emacs25-bin-common* emacs25-common*   emacs25-el* emacs25-lucid* emacsen-common* enchant* gdm3* gedit* gir1.2-webkit2-4.0* gnome-calendar* gnome-control-center*   gnome-getting-started-docs* gnome-initial-setup* gnome-online-accounts* gnome-shell* gnome-software*   gnome-software-plugin-snap* gnome-user-docs* gnome-user-guide* gufw* hunspell-en-us* hyphen-en-us* indicator-bluetooth*   libedataserverui-1.2-2* libenchant1c2a* libgoa-backend-1.0-1* libgspell-1-1* libwebkit2gtk-4.0-37* libyelp0* mutter*   mythes-en-us* nautilus-share* rhythmbox-plugins* shotwell* ubuntu-desktop* ubuntu-docs* ubuntu-release-upgrader-gtk*   ubuntu-session* ubuntu-software* unity-control-center* update-manager* update-notifier* wbritish* yelp* zenity* 0 upgraded, 0 newly installed, 51 to remove and 0 not upgraded. After this operation, 241 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 336156 files and directories currently installed.) Removing nautilus-share (0.7.3-2ubuntu3) ... Removing apturl (0.5.2ubuntu14.2) ... Removing ubuntu-desktop (1.417.3) ... Removing gufw (18.04.0-0ubuntu1) ... Removing shotwell (0.28.4-0ubuntu1) ... Removing gnome-software-plugin-snap (3.28.1-0ubuntu4.18.04.12) ... Removing aspell-en (2017.08.24-0-0.1) ... update-default-aspell: Removing remove file "/var/lib/aspell/en.remove". Removing aspell (0.60.7~20110707-4) ... Removing chrome-gnome-shell (10-1) ... Removing deja-dup (37.1-2fakesync1ubuntu0.1) ... Removing wbritish (2017.08.24-1) ... Removing mythes-en-us (1:6.0.3-3) ... Removing emacs25-lucid (25.2+1-6) ... Remove dictionaries-common for emacs25 remove/dictionaries-common: Purging byte-compiled files for flavour emacs25 Remove emacsen-common for emacs25 emacsen-common: Handling removal of emacsen flavor emacs25 Removing emacs25-bin-common (25.2+1-6) ... Removing emacs25-el (25.2+1-6) ... Removing emacs25-common (25.2+1-6) ... Removing enchant (1.6.0-11.1) ... Removing gdm3 (3.28.3-0ubuntu18.04.4) ... Removing gedit (3.28.1-1ubuntu1.2) ... Removing gnome-calendar (3.28.2-0ubuntu0.18.04.1) ... Removing unity-control-center (15.04.0+18.04.20180216-0ubuntu1) ... Removing gnome-getting-started-docs (3.28.2-0ubuntu0.1) ... Removing gnome-initial-setup (3.28.0-2ubuntu6.16.04.6) ... Removing gnome-online-accounts (3.28.0-0ubuntu2.1) ... Removing ubuntu-session (3.28.1-0ubuntu3) ... Removing gnome-shell (3.28.4-0ubuntu18.04.1) ... Removing gnome-user-guide (3.28.2+git20180715-0ubuntu0.1) ... Removing gnome-user-docs (3.28.2+git20180715-0ubuntu0.1) ... Removing hyphen-en-us (2.8.8-5) ... Removing libedataserverui-1.2-2:amd64 (3.28.5-0ubuntu0.18.04.2) ... Removing ubuntu-docs (18.04.4) ... Removing yelp (3.26.0-1ubuntu2) ... Removing libyelp0:amd64 (3.26.0-1ubuntu2) ... Removing mutter (3.28.4-0ubuntu18.04.1) ... Removing rhythmbox-plugins (3.4.2-4ubuntu1) ... Removing ubuntu-software (3.28.1-0ubuntu4.18.04.12) ... Removing zenity (3.28.1-1) ... Removing gnome-software (3.28.1-0ubuntu4.18.04.12) ... Removing libgspell-1-1:amd64 (1.6.1-1) ... Removing indicator-bluetooth (0.0.6+17.10.20170605-0ubuntu3) ... Removing gnome-control-center (1:3.28.2-0ubuntu0.18.04.5) ... Removing libgoa-backend-1.0-1:amd64 (3.28.0-0ubuntu2.1) ... Removing update-notifier (3.192.1.7) ... Removing update-manager (1:18.04.11.10) ... Removing ubuntu-release-upgrader-gtk (1:18.04.34) ... Removing gir1.2-webkit2-4.0:amd64 (2.24.4-0ubuntu0.18.04.1) ... Removing libwebkit2gtk-4.0-37:amd64 (2.24.4-0ubuntu0.18.04.1) ... Removing libenchant1c2a:amd64 (1.6.0-11.1) ... Removing hunspell-en-us (1:2017.08.24) ... Removing dictionaries-common (1.27.2) ... Removing 'diversion of /usr/share/dict/words to /usr/share/dict/words.pre-dictionaries-common by dictionaries-common' Removing emacsen-common (2.0.8) ... Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ... Processing triggers for install-info (6.5.0.dfsg.1-2) ... Processing triggers for cracklib-runtime (2.9.2-5build1) ... Processing triggers for libglib2.0-0:amd64 (2.56.4-0ubuntu0.18.04.4) ... Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Processing triggers for libc-bin (2.27-3ubuntu1) ... Processing triggers for man-db (2.8.3-2ubuntu0.1) ... Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for mime-support (3.60ubuntu1) ... (Reading database ... 328258 files and directories currently installed.) Purging configuration files for deja-dup (37.1-2fakesync1ubuntu0.1) ... Purging configuration files for wbritish (2017.08.24-1) ... Purging configuration files for unity-control-center (15.04.0+18.04.20180216-0ubuntu1) ... Purging configuration files for gufw (18.04.0-0ubuntu1) ... dpkg: warning: while removing gufw, directory '/etc/gufw' not empty so not removed Purging configuration files for dictionaries-common (1.27.2) ... Purging configuration files for emacsen-common (2.0.8) ... Purging configuration files for gdm3 (3.28.3-0ubuntu18.04.4) ... Removing user `gdm' ... Warning: group `gdm' has no more members. userdel: user gdm is currently used by process 1272 /usr/sbin/deluser: `/usr/sbin/userdel gdm' returned error code 8. Exiting. Could not remove gdm user. /usr/sbin/delgroup: `gdm' still has `gdm' as their primary group! Could not remove gdm group. Purging configuration files for update-notifier (3.192.1.7) ... Purging configuration files for gnome-software (3.28.1-0ubuntu4.18.04.12) ... Purging configuration files for aspell-en (2017.08.24-0-0.1) ... Purging configuration files for gnome-initial-setup (3.28.0-2ubuntu6.16.04.6) ... Removing user `gnome-initial-setup' ... Warning: group `nogroup' has no more members. Done. Purging configuration files for chrome-gnome-shell (10-1) ... Purging configuration files for indicator-bluetooth (0.0.6+17.10.20170605-0ubuntu3) ... Processing triggers for systemd (237-3ubuntu10.29) ... Processing triggers for dbus (1.12.2-1ubuntu1.1) ... Processing triggers for ureadahead (0.100.0-21) ... ureadahead will be reprofiled on next reboot 

I did not read the whole package list during confirmation, usually it doesn’t act this way. But looking at the uninstall log I found a lot of things other than emacs being removed. I tried opening the software center just to check and it didn’t work.

I tried installing emacs again afterwards using

sudo apt install emacs

But it didn’t install the rest of the applications that were removed? How can I undo this? Is there any way to get back all of my applications which were removed?

Not able to `sudo apt install` anything

I had been experimenting with a software called topgrade ever since then I ran into some problems on my system which was previously working fine. It started with not being able to launch vscode from the command line using code (even though it was installed and I could launch it by pressing the window key and looking it up) then I discovered that my apt is also broken. Whenever I tried installing anything using apt it would get stuck at

Setting up mysql-server-5.7 (5.7.27-0ubuntu0.16.04.1) ... insserv: warning: current start runlevel(s) (empty) of script `mysql' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' overrides LSB defaults (0 1 6).  

So I closed the terminal in which the install was running and tried to install it in another terminal but the dpkg lock frontend error started coming up so I tried killing all the apt processes and ran the install again but the dpkg lock error still showed up so I went ahead and deleted the lock-frontend file still things didn’t work

Did a reboot tried apt install again and I was asked to configure dpkg so I ran sudo dpkg --configure -a and it was again stuck at the mysql-server setup.

So I tried the solution in this post to fix the mysql-server from hanging Ubuntu update stops while configuring mysql-server-5.7

It worked at least the mysql server doesn’t hang anymore but when I ran sudo dpkg --configure -a and got the following log https://pastebin.com/nwcAcZW8 which now shows a git-daemon-run error and I get the same error when I try to run apt install

After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n]   Setting up runit (2.1.2-3ubuntu1) ... start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused dpkg: error processing package runit (--configure):  subprocess installed post-installation script returned error exit status 1 No apport report written because the error message indicates its a followup error from a previous failure.                                                                                                           dpkg: dependency problems prevent configuration of git-daemon-run:  git-daemon-run depends on runit; however:   Package runit is not configured yet.  dpkg: error processing package git-daemon-run (--configure):  dependency problems - leaving unconfigured Errors were encountered while processing:  runit  git-daemon-run E: Sub-process /usr/bin/dpkg returned an error code (1)  
sudo apt-get purge runit sudo apt-get autoremove sudo apt update sudo apt install runit 

So I purged runit and tried to install it again and go the following error

The following NEW packages will be installed:   fgetty runit 0 upgraded, 2 newly installed, 0 to remove and 205 not upgraded. Need to get 121 kB of archives. After this operation, 567 kB of additional disk space will be used. Do you want to continue? [Y/n]  Get:1 http://it-mirrors.evowise.com/ubuntu xenial/universe amd64 fgetty amd64 0.7-1 [18.9 kB] Get:2 http://it-mirrors.evowise.com/ubuntu xenial/universe amd64 runit amd64 2.1.2-3ubuntu1 [102 kB] Fetched 121 kB in 1s (62.8 kB/s) Selecting previously unselected package fgetty. (Reading database ... 538427 files and directories currently installed.) Preparing to unpack .../fgetty_0.7-1_amd64.deb ... Unpacking fgetty (0.7-1) ... Selecting previously unselected package runit. Preparing to unpack .../runit_2.1.2-3ubuntu1_amd64.deb ... Unpacking runit (2.1.2-3ubuntu1) ... Processing triggers for man-db (2.7.5-1) ... Processing triggers for ureadahead (0.100.0-19) ... ureadahead will be reprofiled on next reboot Setting up fgetty (0.7-1) ... Setting up runit (2.1.2-3ubuntu1) ... start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused dpkg: error processing package runit (--configure):  subprocess installed post-installation script returned error exit status 1 Processing triggers for ureadahead (0.100.0-19) ... Errors were encountered while processing:  runit E: Sub-process /usr/bin/dpkg returned an error code (1)  

Update

I tried the solution suggested by @karel in their answer and when I executed the last command to reinstall runit I got the following error

start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused dpkg: error processing package runit (--configure):  subprocess installed post-installation script returned error exit status 1 Processing triggers for ureadahead (0.100.0-19) ... Errors were encountered while processing:  runit E: Sub-process /usr/bin/dpkg returned an error code (1)  

sudo apt-get update not working and ctrl+alt+t not working

I am using ubuntu 18.04
I have installed python 3.6 and 3.7 together and set default 3.7 Now I am facing two problems:

  1. when I am trying to

    sudo apt-get update
    it shows the error

    Traceback (most recent call last):  File "/usr/lib/cnf-update-db", line 8, in <module> from CommandNotFound.db.creator import DbCreator  File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 11, in <module>  import apt_pkg  ModuleNotFoundError: No module named 'apt_pkg'  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 24, 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'   
  2. ctrl+alt+t command does not open gnome terminal

My Questions are :

  1. Is there any solution to recover?

    OR

  2. How can I reset ubuntu default?