I need help preventing total failure of my system

sofasurfer

Active Member
Joined
May 24, 2022
Messages
200
Reaction score
68
Credits
1,733
I download stuff using "yt-dlp". Yesterday something went wrong and it would not work. I now get this error...
Code:
Extracting URL: https://youtu.be/Vp9W7Tz50gY
[youtube] Vp9W7Tz50gY: Downloading webpage
[youtube] Vp9W7Tz50gY: Downloading ios player API JSON
[youtube] Vp9W7Tz50gY: Downloading android player API JSON
[youtube] Vp9W7Tz50gY: Downloading player 37364e28
WARNING: [youtube] Vp9W7Tz50gY: nsig extraction failed: You may experience throttling for some formats
         n = EHSxLIjDUnqeqb8M ; player = https://www.youtube.com/s/player/37364e28/player_ias.vflset/en_US/base.js
WARNING: [youtube] Vp9W7Tz50gY: nsig extraction failed: You may experience throttling for some formats
         n = o7jysAyQF5P9PWEI ; player = https://www.youtube.com/s/player/37364e28/player_ias.vflset/en_US/base.js
[info] Vp9W7Tz50gY: Downloading 1 format(s): 313+251
ERROR: unable to download video data: HTTP Error 403: Forbidden

I tried to see if "yt-dlp" was broken so I clicked on "synaptic" in the apps window. Synaptic did not come up. So I went to terminal and entered "sudo synaptic". I got this error...
Code:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
E: _cache->open() failed, cannot continue.

So I ran this in terminal...
Code:
  sudo dpkg --configure -a
I got this message...
Code:
The GRUB boot loader was previously installed to a disk that is no        │
 │ longer present, or whose unique identifier has changed for some reason.   │
 │ It is important to make sure that the installed GRUB core image stays in  │
 │ sync with GRUB modules and grub.cfg. Please check again to make sure      │
 │ that GRUB is written to the appropriate boot devices.                     │
 │                                                                           │
 │ If you're unsure which drive is designated as boot drive by your BIOS,    │
 │ it is often a good idea to install GRUB to all of them.                   │
 │                                                                           │
 │ Note: it is possible to install GRUB to partition boot records as well,   │
 │ and some appropriate partitions are offered here. However, this forces    │
 │ GRUB to use the blocklist mechanism, which makes it less reliable, and    │
 │ therefore is not recommended.

Now I am dealing with a grub issue and that is where I STOP!!! What happened and what should I do? Other than that things SEEM to be working. PC starts with no problems.
 
Last edited:


try sudo update-grub
 
try sudo update-grub
I ran "sudo update-grub" and it appears to have had no issues...
Code:
$ sudo update-grub
 
[sudo] password for daryl: 
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.8.0-51-generic
Found initrd image: /boot/initrd.img-6.8.0-51-generic
Found linux image: /boot/vmlinuz-6.8.0-50-generic
Found initrd image: /boot/initrd.img-6.8.0-50-generic
Found memtest86+x64 image: /boot/memtest86+x64.bin
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Adding boot menu entry for UEFI Firmware Settings ...
Found grml-rescueboot ISO image: /boot/grml/debian-live-11.6.0-amd64-gnome.iso
Found grml-rescueboot ISO image: /boot/grml/grml64-full_2021.07.iso
Found grml-rescueboot ISO image: /boot/grml/grml64-full_2022.11.iso
Found grml-rescueboot ISO image: /boot/grml/linuxmint-21.1-cinnamon-64bit.iso
done

Then I tried "sudo dpkg --configure -a" again and got this error...
Code:
$ sudo dpkg --configure -a
dpkg: error: dpkg frontend lock was locked by another process with pid 6972
Note: removing the lock file is always wrong, can damage the locked area
and the entire system. See <https://wiki.debian.org/Teams/Dpkg/FAQ#db-lock>.

I ran "$ top" and there is no pid 6972 listed but I found it by running...
Code:
$ ps -a 6972
    PID TTY      STAT   TIME COMMAND
   1940 tty2     Sl+    0:00 /usr/libexec/gnome-session-binary --session=ubuntu
   6790 pts/0    S+     0:00 sudo synaptic
   6797 pts/1    Sl+    0:01 synaptic
   6970 pts/2    S+     0:00 sudo dpkg --configure -a
   6972 pts/3    S+     0:00 dpkg --configure -a
   6973 pts/3    S+     0:00 /usr/bin/perl /usr/share/debconf/frontend /var/lib/
   7000 pts/3    S+     0:00 /bin/bash /var/lib/dpkg/info/grub-pc.postinst confi
   7270 pts/3    S+     0:00 whiptail --backtitle Package configuration --title 
  12806 pts/5    R+     0:00 ps -a 6972

Where does this leave me?
 
I also ran...
Code:
$ ps -aux | grep 6972
root        6972  0.0  0.0  20440 11936 pts/3    S+   13:20   0:00 dpkg --configure -a
daryl      13220  0.0  0.0   9144  2304 pts/5    S+   14:40   0:00 grep --color=auto 6972
 
I just ran $ sudo kill 6972 and then $ sudo dpkg --configure -a and i again got this message...
Code:
                                                                         │ 
 │ The GRUB boot loader was previously installed to a disk that is no        │ 
 │ longer present, or whose unique identifier has changed for some reason.   │ 
 │ It is important to make sure that the installed GRUB core image stays in  │ 
 │ sync with GRUB modules and grub.cfg. Please check again to make sure      │ 
 │ that GRUB is written to the appropriate boot devices.                     │ 
 │                                                                           │ 
 │ If you're unsure which drive is designated as boot drive by your BIOS,    │ 
 │ it is often a good idea to install GRUB to all of them.                   │ 
 │                                                                           │ 
 │ Note: it is possible to install GRUB to partition boot records as well,   │ 
 │ and some appropriate partitions are offered here. However, this forces    │ 
 │ GRUB to use the blocklist mechanism, which makes it less reliable, and    │ 
 │ therefore is not recommended.

And this is where I fear to tread.
 
This is a bit sticky.

What is the output of..

Code:
fdisk -l

and

Code:
df -h

I highly recommend you back up all your important stuff before attempting this next part.
If it works, great. If it doesn't... well, you can't leave your computer in this state forever.
We need to know what drive you are on, and if there's room to install grub.
Assuming that there is...

Code:
sudo mount /dev/sdX# /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sdX

Code:
sudo update-grub

Assuming all that works, you should be able to reboot.
 
Just so you know, I have not made any changes such as hard drive connections or partitioning.
Here is what you asked for...
Code:
daryl@daryl-Inspiron-660:~$ sudo fdisk -l
[sudo] password for daryl:
Disk /dev/loop0: 4 KiB, 4096 bytes, 8 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 175.78 MiB, 184320000 bytes, 360000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 175.4 MiB, 183918592 bytes, 359216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 175.98 MiB, 184532992 bytes, 360416 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 174.47 MiB, 182943744 bytes, 357312 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 4.08 MiB, 4276224 bytes, 8352 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop6: 4.08 MiB, 4276224 bytes, 8352 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop7: 55.66 MiB, 58363904 bytes, 113992 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 298.09 GiB, 320072933376 bytes, 625142448 sectors
Disk model: WDC WD3200BPVT-2
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x405cbc32

Device     Boot Start       End   Sectors   Size Id Type
/dev/sda1        2048 625141759 625139712 298.1G 83 Linux


Disk /dev/sdb: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: CT1000MX500SSD1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x405cbc32

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sdb1  *          2046 1953523711 1953521666 931.5G  5 Extended
/dev/sdb5        113065984 1890949119 1777883136 847.8G 83 Linux
/dev/sdb6             2048  113065983  113063936  53.9G 83 Linux
/dev/sdb7       1890951168 1953523711   62572544  29.8G 83 Linux

Partition 1 does not start on physical sector boundary.
Partition table entries are not in disk order.


Disk /dev/loop8: 55.36 MiB, 58052608 bytes, 113384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop9: 63.97 MiB, 67080192 bytes, 131016 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop10: 63.7 MiB, 66789376 bytes, 130448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop11: 73.87 MiB, 77459456 bytes, 151288 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop13: 73.88 MiB, 77463552 bytes, 151296 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop12: 67.76 MiB, 71049216 bytes, 138768 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop14: 67.76 MiB, 71053312 bytes, 138776 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop15: 11.11 MiB, 11649024 bytes, 22752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop16: 274.45 MiB, 287776768 bytes, 562064 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop17: 274.84 MiB, 288194560 bytes, 562880 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop18: 349.7 MiB, 366682112 bytes, 716176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop19: 164.82 MiB, 172830720 bytes, 337560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop20: 516.01 MiB, 541073408 bytes, 1056784 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop21: 349.69 MiB, 366678016 bytes, 716168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop22: 505.09 MiB, 529625088 bytes, 1034424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop23: 62.09 MiB, 65105920 bytes, 127160 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop25: 91.69 MiB, 96141312 bytes, 187776 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop24: 10.76 MiB, 11280384 bytes, 22032 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop26: 10.77 MiB, 11292672 bytes, 22056 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop28: 44.44 MiB, 46596096 bytes, 91008 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop27: 44.3 MiB, 46448640 bytes, 90720 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop29: 568 KiB, 581632 bytes, 1136 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop30: 150.55 MiB, 157868032 bytes, 308336 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop31: 150.59 MiB, 157908992 bytes, 308416 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop32: 128.1 MiB, 134320128 bytes, 262344 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop33: 122.29 MiB, 128225280 bytes, 250440 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Code:
$ df -h
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           1.6G  5.2M  1.6G   1% /run
/dev/sdb6        53G   29G   24G  55% /
tmpfs           7.8G  4.0K  7.8G   1% /dev/shm
tmpfs           5.0M  8.0K  5.0M   1% /run/lock
/dev/sda1       293G  250G   28G  90% /mnt/0bb8860f-be54-4d20-9d77-b2e7f69c1cbb
/dev/sdb5       834G  235G  557G  30% /home
tmpfs           1.6G  2.7M  1.6G   1% /run/user/1000

The "/dev/sda1 293G 250G 28G 90% /mnt/0bb8860f-be54-4d20-9d77-b2e7f69c1cbb" is my backup drive.

I am not ready, mentally, to do the boot reinstall.
I have my /Home folder backed up.
QUESTION... I want to do the boot reinstall from a live media, correct?

Here is my drive layout from gparted...
 

Attachments

  • Screenshot from 2025-01-24 15-16-13.png
    Screenshot from 2025-01-24 15-16-13.png
    48.8 KB · Views: 19
The "/dev/sda1 293G 250G 28G 90% /mnt/0bb8860f-be54-4d20-9d77-b2e7f69c1cbb" is my backup drive.

I am not ready, mentally, to do the boot reinstall.
I have my /Home folder backed up.
QUESTION... I want to do the boot reinstall from a live media, correct?

Wow, that's a lot of loop devices, (snaps I suppose)
If you have everything backed up, it might be easier to do a re-install of everything.
The problem with using a live media to repair your disk, is you have to reboot with the live media.

I suppose I should have asked you, have you already rebooted since you got this error?
 
I think we have a miscommunication. I have no problem booting. My problem (as far as I have seen so far) is the I can not use yt-dlp, I can not open SOME application in the "show apps" window and must use the console to open them and when I try to use synaptic I get the big message about grub being installed on a disk that is no longer present.
Yes, I am confused also so don't feel bad.
 
My apologies, I thought we were trying to fix the missing grub.
 
I use a USB flash drive to boot my Linux computer. This makes it possible to disconnect the flash drive after booting so this kind of thing can be blocked. It looks like you may have used something with some malware. Have you considered scanning your system with a good AV scanner or testing any new software with virustotal?

Signed,

Matthew Campbell
 
I have noticed that youtube has recently changed the formatting of their web pages to try to prevent people from downloading anything from youtube. Even the browser add-ons aren't working. Someone needs to analyze this and write a new add-on that will work.

Signed,

Matthew Campbell
 
I have noticed that youtube has recently changed the formatting of their web pages to try to prevent people from downloading anything from youtube.
It might have something to do with this?
Not the same but wouldn't be suprised if they made a similar change for Youtube.
 
It might have something to do with this?
Not the same but wouldn't be suprised if they made a similar change for Youtube.
youtube has required JavaScript for as long as I can remember. JavaScript is required to play media, including video and audio. I tried to load a youtube page once, probably more than a year ago, without JavaScript and all I got was a blank page. This is much more recent.

If anyone has found a way to download videos from youtube that still works, please let me know. I have tried numerous browser add-ons that don't work anymore.

Signed,

Matthew Campbell
 
youtube has required JavaScript for as long as I can remember. JavaScript is required to play media, including video and audio. I tried to load a youtube page once, probably more than a year ago, without JavaScript and all I got was a blank page. This is much more recent.

If anyone has found a way to download videos from youtube that still works, please let me know. I have tried numerous browser add-ons that don't work anymore.

Signed,

Matthew Campbell
The yt-dlp program works fine here.

It wasn't clear to me from @sofasurfer that it was the latest version, or most recent version of yt-dlp that was running. Often, if a program has issues, the latest version can resolve them, so an optimal way to proceed would be to take that route of trying the latest version before seeking out other approaches or possible solutions.

For @Trenix25 the following may be of interest:

Here's a download of a largish file on UNIX, about 3/4 of a Gig in size:
Code:
$ yt-dlp https://www.youtube.com/watch?v=AEsdyAeumVQ
[youtube] Extracting URL: https://www.youtube.com/watch?v=AEsdyAeumVQ
[youtube] AEsdyAeumVQ: Downloading webpage
[youtube] AEsdyAeumVQ: Downloading tv player API JSON
[youtube] AEsdyAeumVQ: Downloading ios player API JSON
[youtube] AEsdyAeumVQ: Downloading player 37364e28
[youtube] AEsdyAeumVQ: Downloading m3u8 information
[info] AEsdyAeumVQ: Downloading 1 format(s): 313+251
[download] Destination: The History of UNIX [AEsdyAeumVQ].f313.webm
[download] 100% of  753.96MiB in 00:00:52 at 14.30MiB/s
[download] Destination: The History of UNIX [AEsdyAeumVQ].f251.webm
[download] 100% of    9.48MiB in 00:00:01 at 7.23MiB/s
[Merger] Merging formats into "The History of UNIX [AEsdyAeumVQ].webm"
Deleting original file The History of UNIX [AEsdyAeumVQ].f251.webm (pass -k to keep)
Deleting original file The History of UNIX [AEsdyAeumVQ].f313.webm (pass -k to keep)

The current version of yt-dlp is as follows:
Code:
$ apt list yt-dlp
yt-dlp/testing,now 2025.01.15-1 all [installed,automatic]

Here's the downloaded file:
Code:
$ ls
<snip>
 'The History of UNIX [AEsdyAeumVQ].webm'
<snip>

The file name is changed here just for convenience:
Code:
$ mv The\ History\ of\ UNIX\ \[AEsdyAeumVQ\].webm unix.webm

The file is played in a small window specified for mpv:
Code:
$ mpv --geometry=800x600 unix.webm
● Video  --vid=1  --vlang=eng  (vp9 3840x2160 25 fps) [default]
● Audio  --aid=1  --alang=eng  (opus 2ch 48000 Hz) [default]
AO: [pipewire] 48000Hz stereo 2ch floatp
VO: [gpu] 3840x2160 yuv420p
AV: 00:00:05 / 00:10:29 (1%) A-V:  0.000 Dropped: 90
Exiting... (Quit)
The video plays as expected. With debian, it may all depend on one's debian version and the recency of the yt-dlp version. For other distros, one needs to translate into their modus operandi :-)
 
I too experienced some unexpected behaviour from yt-dlp.....It certainly did not wish to complete the job easily or quickly....I could not be bothered with detail at the time so because I am running LM22.1 i opened Software Manager and download Video Downloader (two separate words, not VideoDownloader)

The difference is the one word item is a flatpak and the two word item is a system package

The system package works very nicely...no dramas at all.
 
Last edited:
@sofasurferwhich Linux and which version are you running, please?
 
youtube has required JavaScript for as long as I can remember.
It wasn't required for Google Search up until last week. I'm sure some of those youtube download command-line tools that others have mentioned here should still work.
 
Okay...
TOC:
1. Answer/explain some stuff
2. Fix yt-dlp
4. Addendum


Answer/explain some stuff
sofasurfer said:
$ sudo dpkg --configure -a
dpkg: error: dpkg frontend lock was locked by another process with pid 6972
Note: removing the lock file is always wrong, can damage the locked area
and the entire system. See <https://wiki.debian.org/Teams/Dpkg/FAQ#db-lock>.
What TF ye ask: This is a feature to prevent race conditions similar to a mutex in programming
Why TF ye ask: Well remember here:
sofasurfer said:
I tried to see if "yt-dlp" was broken so I clicked on "synaptic" in the apps window. Synaptic did not come up. So I went to terminal and entered "sudo synaptic". I got this error...
Code:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
E: _cache->open() failed, cannot continue.
Do not use Synaptic to install packages.
To address the issue in plain English: it did not remove the lock on dpkg's frontend (synaptic, in this case). Weird because AFAIK -- and correct me if I'm wrong -- the lock is process-bound, but an "unclean" exit may have left a forked subprocess or something. Best practices # killall synaptic as mentioned below...

sofasurfer said:
dpkg --configure -a
Avoid --configure unless you actually have to (like actual interrupted installs). Quickly on what it does: --configure configures "unconfigured" packages. So it's preferable to just reinstall stuff where possible and hope it triggers --configure next round. Yes, the GRUB thing was a bug (sorta), it appeared unconfigured (for a reason) even though it was. Anyhoo...

Prevention is Better Than Cure:
Step 1: Don't use Synaptic to install stuff. Use it as a package browser, not installer. On Debian and most Debian-based distros, use apt is a more reliable frontend for dpkg. That is why it is there. It is not hard to use.
Step 2: When you get issues such as this use # killall synaptic (kills all instances of it, not just a single process, and asks them to exit cleanly). As I said, the lock file is process-bound so it's supposed to die if the process does.
Step 3: Closest distance between two points: backup configs for said package. Then # apt-get purge <your apps> && apt-get update && apt-get install <your app(s)>. You can use apt-get reinstall but this will not fully remove the package and config (neither, technically will purge as some configs persist, but it mops up a little better -- note the update step is optional but advised to get the latest version and ensure less breakages when running install).

Cure if No Prevention:
Step 1: Try to run # apt-get clean && apt-get update
Step 2: If the above fails: Reboot. Now try step 1. Technically /var/lib/dpkg/lock-frontend will be released.
Step 3: You should be done. But if you're getting errors, try # apt-cache gencache.
Step 4: # apt-get upgrade (assuming update ran properly) which'll bring all packages into alignment. It may even help in removing some broken ones.


Fix yt-dlp:
Can We Fix yt-dlp Please!!!
In a minute. Just quickly want to tell you about the time I... Kidding.

1. In Debian, the yt-dlp package used to fall majorly behind the upstream version (Fedora and Arch users be smiling to themselves). This has improved but I still use upstream...
2. Remove yt-dlp: # apt-get purge yt-dlp.
3. Install it with pip (not as root): $ pip install yt-dlp --break-system-packages This will install it locally meaning you can only run it as your user, not root nor anyone else. It won't break packages and you don't need a venv for this (websearch, RTFM, etc. it if you care).
4. To keep up to date in the future: $ pip install -U yt-dlp --break-system-packages which upgrades it (I remind you, no sudo)

Right, now any issue with yt-dlp will be upstream. Whenever you have problems, simply upgrade. If that doesn't work, be patient, they will patch it.


Addendum:
1. Sometimes youtube videos are unavailable because: it's a private video, it's age-restricted, it's geo-blocked, it no longer exists but remained cached. The former issues would generally give warmings, the latter may not leave you as forunate.
2. Live streams may cause unexpected heviour, so avoid.
3. You may need to add PATH="$PATH:/home<your user>/.local/bin" to your .bashrc file, though it's highly unlikely as generally this and other user paths are defined already.
4. yt-dlp works fine for me on desktop and smartphone (via Termux).
 
Last edited:


Latest posts

Top