1

I just started using Ubuntu and I got an error like this after downloading a program. I can't fix this error. I can't update or when I want to do any download I am getting this:

Reading package lists... Done
Creating dependency tree... Done
Reading status info... Done
E: The package st-stlink-udev-rules needs to be reinstalled, but the required archive file cannot be found. 

I think I also corrupted the sources.list file while trying to fix this. I need to install a few programs but I can't download anything including updates. Also I don't know how to download the st-stlink-udev-rules package. Since I am in the middle of a very important job, I need to fix this error without reinstalling the system.

Buket
  • 11
  • Welcome to askubuntu. (1) This is an English speaking community. If you don't speak English, you can use an online translater. (2) Please don't add screenshots of textual output. Rather paste the text and format it as code. – pLumo Sep 28 '21 at 10:38
  • Since you are new Ubuntu user, I would recommend a complete re-install. Please, backup any important documents and other files to a USB drive and re-install Ubuntu. – FedKad Sep 28 '21 at 10:46
  • Nothing has changed. – Buket Sep 28 '21 at 12:58
  • Please run grep -r "^deb " /etc/apt/ --include="*.list" and upload output to pastebin. The st-stlink-udev-rules packages was probably installed for STM32 microcontrollers. Do you plan to use them in near future? – N0rbert Sep 28 '21 at 16:58
  • Yes I encountered this error after downloading and deleting STM32Cube and I don't plan to use it anytime soon.

    Output: /etc/apt/sources.list:deb http://tr.archive.ubuntu.com/ubuntu/ hirsute main universe

    – Buket Sep 29 '21 at 05:18

1 Answers1

0

I fixed with this command:

sudo dpkg --remove --force-remove-reinstreq st-stlink-udev-rules
Buket
  • 11