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
  • 1
  • 5

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
  • 47,684
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
  • 122,292
  • 133
  • 301
  • 332