0

Which version (for example 18.04.1 LTS) and which flavour (standard Ubuntu or a community flavour for example Lubuntu or Xubuntu) are your running?

Processor : Intel® Core™ i5-3320M CPU @ 2.60GHz × 4

Base System : Ubuntu 16.04.6 LTS 64-bit


Is the computer connected to the internet?

Yes


If installed, were there any errors during the installation?

No


Did it work before (and stopped working for some reason), or has it never worked (to install programs)?

Yes, it was working before, it happend right after i was trying to install python 3.6, i may have removed some python librarly/folder that is required by "usb-creator-gtk" package.


Whenever I try to install anything this error comes up, Example i'm trying to install anydesk or any other software

dpkg: warning: files list file for package 'python3.6-minimal' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python2.7' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3.5-minimal' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python2.7-dev' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python2.7-minimal' missing; assuming package has no files currently installed
(Reading database ... 194325 files and directories currently installed.)
Preparing to unpack anydesk_5.1.1-1_amd64.deb ...
Failed to stop anydesk.service: Unit anydesk.service not loaded.
Unpacking anydesk (5.1.1) over (5.1.1) ...
dpkg: dependency problems prevent configuration of anydesk:
 anydesk depends on libgtkglext1; however:
  Package libgtkglext1 is not installed.

dpkg: error processing package anydesk (--install):
 dependency problems - leaving unconfigured
Processing triggers for desktop-file-utils (0.22-1ubuntu5.2) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ...
Errors were encountered while processing:
 anydesk

I tried this command,

 sudo apt-get install usb-creator-gtk

Giving me this output,

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package usb-creator-gtk needs to be reinstalled, but I can't find an archive for it.

Following command updated

apt-cache policy usb-creator-gtk

Output

usb-creator-gtk:
  Installed: 0.3.2ubuntu16.04.1
  Candidate: 0.3.2ubuntu16.04.1
  Version table:
 *** 0.3.2ubuntu16.04.1 100
        100 /var/lib/dpkg/status
Vipertecpro
  • 101
  • 5
  • Which version (for example 18.04.1 LTS) and which flavour (standard Ubuntu or a community flavour for example Lubuntu or Xubuntu) are your running? Is it installed (or live booted from a USB drive)? Is the computer connected to the internet? If installed, were there any errors during the installation? Did it work before (and stopped working for some reason), or has it never worked (to install programs)? Please edit your original question to answer my questions. – sudodus Sep 13 '19 at 13:53
  • Please add output of apt-cache policy usb-creator-gtk to the question. – N0rbert Sep 14 '19 at 08:22
  • Sure i will update everything , give me time till monday, actually this issue is my facing in office laptop, first thing morning monday,i will update this question – Vipertecpro Sep 14 '19 at 08:28
  • @N0rbert Please check i've updated the command that you've mentioned – Vipertecpro Sep 16 '19 at 05:29
  • @sudodus Please check I've updated my question in details, please let me know if any further information is required. – Vipertecpro Sep 16 '19 at 05:44

2 Answers2

0

In my installed 18.04.1 LTS I have Python 2.7, as indicated by the following command.

$ LANG=C apt-cache policy python
python:
  Installed: 2.7.15~rc1-1
  Candidate: 2.7.15~rc1-1
  Version table:
 *** 2.7.15~rc1-1 500
        500 http://se.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

I think you are right, when you suspect that the problem is the attempt to install Python 3.6.

I suggest that you try to remove it

sudo apt remove name-of-your-python-3.6-package

and after that try to reinstall the python2.7 package

sudo apt install python2.7

I am not sure that apt will be able to remove your Python 3.6 package and (re)install Python 2.7, and I don't know what to do if not, maybe use

sudo dpkg --configure -a
sudo dpkg -r package-name  # to remove
sudo dpkg -i package-name  # to install

If still problems, we need help from someone who knows more about repairing vital parts of Ubuntu, maybe @oldfred.

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • Sir after running the first command this is the output LANG=C apt-cache policy python python: Installed: (none) Candidate: (none) Version table: 2.7.12-1~16.04 0 100 /var/lib/dpkg/status – Vipertecpro Sep 16 '19 at 06:42
  • And after trying this sudo apt remove name-of-your-python-3.6-package this says this E: The package usb-creator-gtk needs to be reinstalled, but I can't find an archive for it. – Vipertecpro Sep 16 '19 at 06:43
  • @Vipertecpro, At this stage, will it be possible to install python2.7 with apt or maybe with a dpkg command line? And did you use name-of-your-python-3.6-packageliterally or did you use the real name of the package? – sudodus Sep 16 '19 at 06:46
  • No as i said nothing is installing :( looks like formating system is the only option left, I went to the ubuntu official site here "https://pkgs.org/download/usb-creator-gtk" to install this package "usb-creator-gtk" but doesn't work either, and no not literally i tried every command to remove/update/install python but nothing is installing and removing from the system. – Vipertecpro Sep 16 '19 at 07:11
  • This command "sudo dpkg --configure -a" returning this dpkg: dependency problems prevent configuration of gir1.2-ibus-1.0:amd64: gir1.2-ibus-1.0:amd64 depends on python3:any (>= 3.3.2-2~) and alot of other details... and at the last it says dpkg: error processing package gnome-menus (--configure): dependency problems - leaving triggers unprocessed Errors were encountered while processing: gir1.2-ibus-1.0:amd64 usb-creator-common anydesk teamviewer gnome-menus – Vipertecpro Sep 16 '19 at 07:13
  • @Vipertecpro, I am sorry to read that those commands do not work. Maybe you can try also sudo apt install -f. If you can wait, maybe we can get advanced help from @oldfred. Otherwise, the alternative is to backup what needs to be backed up and reinstall. – sudodus Sep 16 '19 at 07:19
  • 1
    It's okay I already took a backup of my system, I can wait really if any problem can be solved by programmatically, I will be most happy to understand and learn what's the core of it. – Vipertecpro Sep 16 '19 at 07:26
  • @Vipertecpro, It is also a good idea to check the drive's hardware and the file system when booted from a live drive according to this link before you reinstall. – sudodus Sep 16 '19 at 07:27
  • 1
    @Vipertecpro Note, pkgs.org is not "the ubuntu official site", – fkraiem Sep 17 '19 at 07:12
0

Open the terminal and type:

sudo apt install python3.5 python2.7 python2.7-dev  
sudo reboot  

After the computer reboots open the terminal and type:

sudo apt purge python3.6  
sudo apt update   
sudo apt upgrade  

If sudo apt update or sudo apt upgrade result in an error message, please post the error message in a comment, especially if you are asked to run an additional command.

In order to reinstall usb-creator-gtk. you must add a new line to /etc/apt/sources.list. Open /etc/apt/sources.list for editing with the following command:

sudoedit /etc/apt/sources.list  

Add the following line to the sources.list file:

deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse  

Please check the sources.list file carefully before you save it to make sure that there are not two duplicate deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse lines. There must be only one unique line, not two duplicate lines, and that unique line must not be commented out by being started with a # character.

Press the keyboard combination Ctrl+O and after that press Enter to save the sources.list file being edited. Press the keyboard combination Ctrl+X to exit nano.

Run the following commands to update the list of available software and reinstall usb-creator-gtk:

sudo apt update  
sudo apt install usb-creator-gtk

I can't see your sources.list file from here, so maybe it already had a deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse line in it in which case the above commands would do nothing. So reinstall usb-creator-gtk manually instead. Download usb-creator-gtk_0.3.2ubuntu16.04.1_amd64.deb from the official Ubuntu website. Open the terminal and change directories using cd to the directory that contains the usb-creator-gtk_0.3.2ubuntu16.04.1_amd64.deb file that you downloaded. Install usb-creator-gtk with the following command:

sudo apt install ./usb-creator-gtk_0.3.2ubuntu16.04.1_amd64.deb  
karel
  • 114,770
  • sudo apt upgrade return Reading package lists... Done Building dependency tree Reading state information... Done E: The package usb-creator-gtk needs to be reinstalled, but I can't find an archive for it. – Vipertecpro Sep 17 '19 at 06:12
  • @Vipertecpro Please run the commands that I added to my answer to reinstall usb-creator-gtk. – karel Sep 17 '19 at 06:44