apt not working - linux-image failing to process

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
DMT_1024
Level 2
Level 2
Posts: 61
Joined: Fri May 27, 2022 11:13 pm

apt not working - linux-image failing to process

Post by DMT_1024 »

hii
this kid stuck in errors
using linux mint 20.3 cinnamon [from April 2022]
for some days [2-3 weeks ] whenever i install update a pop up cames with error massage not all updates are installed .......
i ignore that
today my samba stoped working i tryed to reinstall samba and then

Code: Select all

d@MINTBOOK:~$ sudo apt reinstall samba
The following packages will be REINSTALLED:
  samba 
The following partially installed packages will be configured:
  doc-base linux-generic linux-image-5.4.0-121-generic linux-image-generic 
  linux-modules-extra-5.4.0-121-generic 
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/11.6 MB of archives. After unpacking 0 B will be used.
(Reading database ... 388489 files and directories currently installed.)
Preparing to unpack .../samba_2%3a4.13.17~dfsg-0ubuntu0.21.04.2_amd64.deb ...
Unpacking samba (2:4.13.17~dfsg-0ubuntu0.21.04.2) over (2:4.13.17~dfsg-0ubuntu0.21.04.2) ...
Setting up doc-base (0.10.9) ...
Registering 47 doc-base files...
[b]Database error: Cannot save file `/var/lib/doc-base/info/status-new.yml': Can't locate PerlIO.pm in @INC (you may need to install the PerlIO module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/YAML/Tiny.pm line 576.
BEGIN failed--compilation aborted.
.[/b]

**  Trying to recover from the above install-docs error by
**  removing its internal databases and re-calling it afterwards

mv: [b]cannot stat '/var/lib/doc-base/info/status.yml'[/b]: No such file or directory
dpkg: error processing package doc-base (--configure):
 installed doc-base package post-installation script subprocess returned error exit status 1
Setting up linux-image-5.4.0-121-generic (5.4.0-121.137) ...
[b]Can't locate DebianLinux.pm in @INC (you may need to install the DebianLinux module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/bin/linux-update-symlinks line 24.[/b]
BEGIN failed--compilation aborted at /usr/bin/linux-update-symlinks line 24.
dpkg: error processing package linux-image-5.4.0-121-generic (--configure):
 installed linux-image-5.4.0-121-generic package post-installation script subprocess returned error exit status 2
Setting up samba (2:4.13.17~dfsg-0ubuntu0.21.04.2) ...
Samba is not being run as an AD Domain Controller: Masking samba-ad-dc.service
Please ignore the following error about deb-systemd-helper not finding those services.
(samba-ad-dc.service already masked)
Failed to preset unit: Unit file /etc/systemd/system/samba-ad-dc.service is masked.
/usr/bin/deb-systemd-helper: error: systemctl preset failed on samba-ad-dc.service: No such file or directory
samba-ad-dc.service is a disabled or a static unit not running, not starting it.
Job for nmbd.service failed because the control process exited with error code.
See "systemctl status nmbd.service" and "journalctl -xe" for details.
Job for smbd.service failed because the control process exited with error code.
See "systemctl status smbd.service" and "journalctl -xe" for details.
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-5.4.0-121-generic; however:
  Package linux-image-5.4.0-121-generic is not configured yet.

dpkg: error processing package linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 5.4.0.121.122); however:
  Package linux-image-generic is not configured yet.

dpkg: error processing package linux-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-modules-extra-5.4.0-121-generic:
 linux-modules-extra-5.4.0-121-generic depends on linux-image-5.4.0-121-generic | linux-image-unsigned-5.4.0-121-generic; however:
  Package linux-image-5.4.0-121-generic is not configured yet.
  Package linux-image-unsigned-5.4.0-121-generic is not installed.

dpkg: error processing package linux-modules-extra-5.4.0-121-generic (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
Processing triggers for ufw (0.36-6ubuntu1) ...
Processing triggers for systemd (245.4-4ubuntu3.17) ...
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
 doc-base
 linux-image-5.4.0-121-generic
 linux-image-generic
 linux-generic
 linux-modules-extra-5.4.0-121-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
Setting up doc-base (0.10.9) ...
Registering 47 doc-base files...
Database error: Cannot save file `/var/lib/doc-base/info/status-new.yml': Can't locate PerlIO.pm in @INC (you may need to install the PerlIO module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/YAML/Tiny.pm line 576.
BEGIN failed--compilation aborted.
.

**  Trying to recover from the above install-docs error by
**  removing its internal databases and re-calling it afterwards

mv: cannot stat '/var/lib/doc-base/info/status.yml': No such file or directory
dpkg: error processing package doc-base (--configure):
 installed doc-base package post-installation script subprocess returned error exit status 1
Setting up linux-image-5.4.0-121-generic (5.4.0-121.137) ...
Can't locate DebianLinux.pm in @INC (you may need to install the DebianLinux module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/bin/linux-update-symlinks line 24.
BEGIN failed--compilation aborted at /usr/bin/linux-update-symlinks line 24.
dpkg: error processing package linux-image-5.4.0-121-generic (--configure):
 installed linux-image-5.4.0-121-generic package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-5.4.0-121-generic; however:
  Package linux-image-5.4.0-121-generic is not configured yet.

dpkg: error processing package linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 5.4.0.121.122); however:
  Package linux-image-generic is not configured yet.

dpkg: error processing package linux-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-modules-extra-5.4.0-121-generic:
 linux-modules-extra-5.4.0-121-generic depends on linux-image-5.4.0-121-generic | linux-image-unsigned-5.4.0-121-generic; however:
  Package linux-image-5.4.0-121-generic is not configured yet.
  Package linux-image-unsigned-5.4.0-121-generic is not installed.

dpkg: error processing package linux-modules-extra-5.4.0-121-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 doc-base
 linux-image-5.4.0-121-generic
 linux-image-generic
 linux-generic
 linux-modules-extra-5.4.0-121-generic
then i tried to install perl

Code: Select all

d@MINTBOOK:~$ sudo apt install perl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
perl is already the newest version (5.30.0-9ubuntu0.2).
The following packages will be REMOVED:
  linux-image-5.4.0-117-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
6 not fully installed or removed.
After this operation, 13.7 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 388489 files and directories currently installed.)
Removing linux-image-5.4.0-117-generic (5.4.0-117.132) ...
Can't locate DebianLinux.pm in @INC (you may need to install the DebianLinux mod
ule) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/
local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /u
sr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl 
/usr/lib/x86_64-linux-gnu/perl-base) at /usr/bin/linux-update-symlinks line 24.
BEGIN failed--compilation aborted at /usr/bin/linux-update-symlinks line 24.
dpkg: error processing package linux-image-5.4.0-117-generic (--remove):
 installed linux-image-5.4.0-117-generic package post-removal script subprocess 
returned error exit status 2
[b]dpkg: too many errors, stopping[/b]
Errors were encountered while processing:
 linux-image-5.4.0-117-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

what should i do now
??????
Last edited by LockBot on Wed Jan 04, 2023 11:00 pm, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Nikolai5
Level 4
Level 4
Posts: 309
Joined: Thu Dec 23, 2021 5:25 pm
Location: Northern England

Re: cant understand what happning

Post by Nikolai5 »

Can you paste the results of this please:

Code: Select all

inxi -Fxxxrz
It may be that you just need to run the apt fix broken commands.
DMT_1024
Level 2
Level 2
Posts: 61
Joined: Fri May 27, 2022 11:13 pm

Re: cant understand what happning

Post by DMT_1024 »

Code: Select all

d@MINTBOOK:~$ inxi -Fxxxrz
Can't locate File/Find.pm in @INC (you may need to install the File::Find module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/bin/inxi line 24.
BEGIN failed--compilation aborted at /usr/bin/inxi line 24.
User avatar
Termy
Level 12
Level 12
Posts: 4254
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: cant understand what happning

Post by Termy »

Code: Select all

Can't locate File/Find.pm in @INC (you may need to install the File::Find module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/bin/inxi line 24.
As suggested above, the issue seems to stem from a PERL script being unable to create a save file, because it for some reason requires the File::Find module. :lol: This is why I avoid using that module unless necessary in my PERL scripts, but also, saving a file surely shouldn't require that? Regardless, that module is usually included with PERL as part of the bundled modules, via the 'perl-modules-*' package (where '*' is the version).

Have you at any point messed around with PERL on your system? Such as by installing the latest version from another source? If not, I'd probably check a suitable package is installed, assuming nothing drastic has changed in newer releases of PERL/Ubuntu (because Linux Mint is based on Ubuntu).

First, check the package is installed:

Code: Select all

dpkg -l perl-modules-* | grep '^ii'
If nothing shows up, it's probably not installed. I'm guessing your version of PERL is 5.30.0, so you can probably just install that version of that package which includes the needed module:

Code: Select all

sudo apt-get install perl-modules-5.30.0
If that doesn't work, out, then check your current PERL version:

Code: Select all

perl --version
Using that information, see if you can find a suitable 'perl-modules-*' package:

Code: Select all

apt-cache search perl-modules-*
If you find a suitable package, install it with:

Code: Select all

sudo apt-get install PKG
Where `PKG` should be substituted with your target package name. For example, I have PERL 5.26.1, so I would run:

Code: Select all

sudo apt-get install perl-modules-5.26.1
The installation should then work, unless something else is also wrong.
I'm also Terminalforlife on GitHub.
DMT_1024
Level 2
Level 2
Posts: 61
Joined: Fri May 27, 2022 11:13 pm

Re: cant understand what happning

Post by DMT_1024 »

Termy wrote: Mon Jul 04, 2022 7:58 am

Code: Select all

Can't locate File/Find.pm in @INC (you may need to install the File::Find module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/bin/inxi line 24.
As suggested above, the issue seems to stem from a PERL script being unable to create a save file, because it for some reason requires the File::Find module. :lol: This is why I avoid using that module unless necessary in my PERL scripts, but also, saving a file surely shouldn't require that? Regardless, that module is usually included with PERL as part of the bundled modules, via the 'perl-modules-*' package (where '*' is the version).

Have you at any point messed around with PERL on your system? Such as by installing the latest version from another source? If not, I'd probably check a suitable package is installed, assuming nothing drastic has changed in newer releases of PERL/Ubuntu (because Linux Mint is based on Ubuntu).
i am a noob installed linux when i crashed my windows 10 in april
i was not knowing what are perl modules ?
ihave not changed my software sources after installation and nothing in perl [in my best belive]

in reply to your codes

Code: Select all

d@MINTBOOK:~$ dpkg -l perl-modules-* | grep '^ii'
ii  perl-modules-5.30 5.30.0-9ubuntu0.2 all          Core Perl modules
yes perl modules are installed

Code: Select all

perl --version

This is perl 5, version 30, subversion 0 (v5.30.0) built for x86_64-linux-gnu-thread-multi
i also give try to reinstall perl module but can't

Code: Select all

d@MINTBOOK:~$ sudo apt-get reinstall perl-modules
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'perl-modules-5.30' instead of 'perl-modules'
The following packages will be REMOVED:
  linux-image-5.4.0-117-generic
0 upgraded, 0 newly installed, 1 reinstalled, 1 to remove and 0 not upgraded.
6 not fully installed or removed.
Need to get 0 B/2,738 kB of archives.
After this operation, 13.7 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 383131 files and directories currently installed.)
Removing linux-image-5.4.0-117-generic (5.4.0-117.132) ...
Can't locate DebianLinux.pm in @INC (you may need to install the DebianLinux module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/bin/linux-update-symlinks line 24.
BEGIN failed--compilation aborted at /usr/bin/linux-update-symlinks line 24.
dpkg: error processing package linux-image-5.4.0-117-generic (--remove):
 installed linux-image-5.4.0-117-generic package post-removal script subprocess returned error exit status 2
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-5.4.0-117-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

Code: Select all

apt-cache search perl-modules-*
libperl5.30 - shared Perl library
perl-base - minimal Perl system
perl-modules-5.30 - Core Perl modules
kamailio-perl-modules - Perl extensions and database driver for the Kamailio SIP server
libnet-smtpauth-perl - Perl module that provides SMTP authentication (Net::SMTP_auth)
last 2 packages are not installed
and i am unable to install or uninstall anything

Code: Select all

d@MINTBOOK:~$ sudo apt-get install kamailio-perl-modules
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  kamailio
Suggested packages:
  kamailio-berkeley-modules kamailio-cpl-modules kamailio-ldap-modules
  kamailio-lua-modules kamailio-mono-modules kamailio-mysql-modules
  kamailio-postgres-modules kamailio-presence-modules kamailio-python3-modules
  kamailio-radius-modules kamailio-redis-modules kamailio-snmpstats-modules
  kamailio-tls-modules kamailio-unixodbc-modules kamailio-xml-modules
  kamailio-xmpp-modules stun-server | turn-server
The following packages will be REMOVED:
  linux-image-5.4.0-117-generic
The following NEW packages will be installed:
  kamailio kamailio-perl-modules
0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
6 not fully installed or removed.
Need to get 8,398 kB of archives.
After this operation, 12.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 kamailio amd64 5.3.2-1build3 [8,313 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal/universe amd64 kamailio-perl-modules amd64 5.3.2-1build3 [84.6 kB]
Fetched 8,398 kB in 2s (3,688 kB/s)              
(Reading database ... 383131 files and directories currently installed.)
Removing linux-image-5.4.0-117-generic (5.4.0-117.132) ...
Can't locate DebianLinux.pm in @INC (you may need to install the DebianLinux module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/bin/linux-update-symlinks line 24.
BEGIN failed--compilation aborted at /usr/bin/linux-update-symlinks line 24.
dpkg: error processing package linux-image-5.4.0-117-generic (--remove):
 installed linux-image-5.4.0-117-generic package post-removal script subprocess returned error exit status 2
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-5.4.0-117-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1
Nikolai5
Level 4
Level 4
Posts: 309
Joined: Thu Dec 23, 2021 5:25 pm
Location: Northern England

Re: cant understand what happning

Post by Nikolai5 »

Can you try running:

Code: Select all

sudo apt autoremove

Code: Select all

sudo apt --fix-broken install
Then try

Code: Select all

sudo apt update
DMT_1024
Level 2
Level 2
Posts: 61
Joined: Fri May 27, 2022 11:13 pm

Re: cant understand what happning

Post by DMT_1024 »

Nikolai5 wrote: Mon Jul 04, 2022 10:23 am Can you try running:

Code: Select all

sudo apt autoremove

Code: Select all

sudo apt --fix-broken install
Then try

Code: Select all

sudo apt update
2 codes not worked

Code: Select all

d@MINTBOOK:~$ sudo apt autoremove
[sudo] password for d:       
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-image-5.4.0-117-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
6 not fully installed or removed.
After this operation, 13.7 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 383131 files and directories currently installed.)
Removing linux-image-5.4.0-117-generic (5.4.0-117.132) ...
Can't locate DebianLinux.pm in @INC (you may need to install the DebianLinux module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/bin/linux-update-symlinks line 24.
BEGIN failed--compilation aborted at /usr/bin/linux-update-symlinks line 24.
dpkg: error processing package linux-image-5.4.0-117-generic (--remove):
 installed linux-image-5.4.0-117-generic package post-removal script subprocess returned error exit status 2
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-5.4.0-117-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
d@MINTBOOK:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-image-5.4.0-117-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
6 not fully installed or removed.
After this operation, 13.7 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 383131 files and directories currently installed.)
Removing linux-image-5.4.0-117-generic (5.4.0-117.132) ...
Can't locate DebianLinux.pm in @INC (you may need to install the DebianLinux mod
ule) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/
local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /u
sr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl 
/usr/lib/x86_64-linux-gnu/perl-base) at /usr/bin/linux-update-symlinks line 24.
BEGIN failed--compilation aborted at /usr/bin/linux-update-symlinks line 24.
dpkg: error processing package linux-image-5.4.0-117-generic (--remove):
 installed linux-image-5.4.0-117-generic package post-removal script subprocess 
returned error exit status 2
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-5.4.0-117-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
plz check the attachement
i think these files may cause problem ?
Attachments
Screenshot from 2022-07-04 20-02-40.png
Screenshot from 2022-07-04 20-02-40.png (7.97 KiB) Viewed 914 times
Nikolai5
Level 4
Level 4
Posts: 309
Joined: Thu Dec 23, 2021 5:25 pm
Location: Northern England

Re: cant understand what happning

Post by Nikolai5 »

I'm not sure, Google searches show that a number of people have reported similar errors with slight differences but I don't just want to copy and paste random commands to you that they ran that might have worked. As it may not work for you.

Can you edit your original post in this thread and change the title to something more meaningful like "apt not working - linux-image failing to process", so that it is noticed by the right people on the forum who may be able to help.

The issue with your current topic title "can't understand what happening" is that people will see that and ignore it as it doesn't mean much.
sleeper12
Level 21
Level 21
Posts: 14397
Joined: Thu May 25, 2017 3:22 pm

Re: apt not working - linux-image failing to process

Post by sleeper12 »

Try:

Code: Select all

sudo dpkg --configure -a
If no help:

Code: Select all

sudo apt-get install -f
If that's no help, post any errors those commands give as they may be useful for someone to solve this.
DMT_1024
Level 2
Level 2
Posts: 61
Joined: Fri May 27, 2022 11:13 pm

Re: apt not working - linux-image failing to process

Post by DMT_1024 »

sleeper12 wrote: Mon Jul 04, 2022 12:00 pm Try:

Code: Select all

sudo dpkg --configure -a
If no help:

Code: Select all

sudo apt-get install -f
If that's no help, post any errors those commands give as they may be useful for someone to solve this.

Code: Select all

d@MINTBOOK:~$ sudo dpkg --configure -a
Setting up doc-base (0.10.9) ...
Registering 47 doc-base files...
Database error: Cannot read file `/var/lib/doc-base/info/files.yml': Can't locate PerlIO.pm in @INC (you may need to install the PerlIO module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/YAML/Tiny.pm line 183.
BEGIN failed--compilation aborted.
.

**  Trying to recover from the above install-docs error by
**  removing its internal databases and re-calling it afterwards

mv: cannot stat '/var/lib/doc-base/info/status.yml': No such file or directory
dpkg: error processing package doc-base (--configure):
 installed doc-base package post-installation script subprocess returned error exit status 1
Setting up linux-image-5.4.0-121-generic (5.4.0-121.137) ...
"image_stem" is not exported by the DebianLinux module
 "read_kernelimg_conf" is not exported by the DebianLinux module
Can't continue after import errors at /usr/bin/linux-update-symlinks line 24.
BEGIN failed--compilation aborted at /usr/bin/linux-update-symlinks line 24.
dpkg: error processing package linux-image-5.4.0-121-generic (--configure):
 installed linux-image-5.4.0-121-generic package post-installation script subprocess returned error exit status 255
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-5.4.0-121-generic; however:
  Package linux-image-5.4.0-121-generic is not configured yet.

dpkg: error processing package linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 5.4.0.121.122); however:
  Package linux-image-generic is not configured yet.

dpkg: error processing package linux-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-modules-extra-5.4.0-121-generic:
 linux-modules-extra-5.4.0-121-generic depends on linux-image-5.4.0-121-generic | linux-image-unsigned-5.4.0-121-generic; however:
  Package linux-image-5.4.0-121-generic is not configured yet.
  Package linux-image-unsigned-5.4.0-121-generic is not installed.

dpkg: error processing package linux-modules-extra-5.4.0-121-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 doc-base
 linux-image-5.4.0-121-generic
 linux-image-generic
 linux-generic
 linux-modules-extra-5.4.0-121-generic
from this link https://www.apt-browse.org/browse/debia ... anLinux.pm
i copy code and past it in /usr/shair/perl5/DebianLinux.pm and then error in 2 code changed
pasting new code

Code: Select all

d@MINTBOOK:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-image-5.4.0-117-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
6 not fully installed or removed.
After this operation, 13.7 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 383131 files and directories currently installed.)
Removing linux-image-5.4.0-117-generic (5.4.0-117.132) ...
"image_stem" is not exported by the DebianLinux module
 "read_kernelimg_conf" is not exported by the DebianLinux module
Can't continue after import errors at /usr/bin/linux-update-symlinks line 24.
BEGIN failed--compilation aborted at /usr/bin/linux-update-symlinks line 24.
dpkg: error processing package linux-image-5.4.0-117-generic (--remove):
 installed linux-image-5.4.0-117-generic package post-removal script subprocess returned error exit status 255
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-5.4.0-117-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
sleeper12
Level 21
Level 21
Posts: 14397
Joined: Thu May 25, 2017 3:22 pm

Re: apt not working - linux-image failing to process

Post by sleeper12 »

Which kernel are you currently using:

Code: Select all

uname -r
DMT_1024
Level 2
Level 2
Posts: 61
Joined: Fri May 27, 2022 11:13 pm

Re: apt not working - linux-image failing to process

Post by DMT_1024 »

Code: Select all

d@MINTBOOK:~$ uname -r
5.4.0-120-generic
hii i have noticed so many other changes too
=>unable to play audio
=> unable to use microphone
+>unable to open(use) cammera
=>unable to install ,remove ,update applictions

i am going to reinstall linux as i need my laptop urgently

any suggetion ???
sleeper12
Level 21
Level 21
Posts: 14397
Joined: Thu May 25, 2017 3:22 pm

Re: apt not working - linux-image failing to process

Post by sleeper12 »

If you have a Timeshift snapshot from before this happened, maybe restoring that will work. If not, probably best to reinstall Mint. Just my opinion, unless someone has a better idea. :wink:
DMT_1024
Level 2
Level 2
Posts: 61
Joined: Fri May 27, 2022 11:13 pm

Re: apt not working - linux-image failing to process

Post by DMT_1024 »

sleeper12 wrote: Mon Jul 04, 2022 9:34 pm If you have a Timeshift snapshot from before this happened, maybe restoring that will work. If not, probably best to reinstall Mint. Just my opinion, unless someone has a better idea. :wink:
i have not created one
how to check it ?

i thought to try another distro this time
sleeper12
Level 21
Level 21
Posts: 14397
Joined: Thu May 25, 2017 3:22 pm

Re: apt not working - linux-image failing to process

Post by sleeper12 »

If you have any snapshots available, they will show as soon as you open Timeshift.

The only other thing I can think to try is see if you can completely remove any or all of these in Synaptic:

linux-image-5.4.0-117-generic
linux-image-5.4.0-121-generic
linux-image-generic
linux-generic
linux-modules-extra-5.4.0-121-generic
DMT_1024
Level 2
Level 2
Posts: 61
Joined: Fri May 27, 2022 11:13 pm

Re: apt not working - linux-image failing to process

Post by DMT_1024 »

BY CINNAMON 20.3
MESSAGE FROM NEWLY INSTALLED LINUXMINT 20.3 MATE


i had one snapshort but when i run that it caused some more error
and stops booting process so i installed linux again

thanks everyone for my help
regards
Divya
User avatar
Termy
Level 12
Level 12
Posts: 4254
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: apt not working - linux-image failing to process

Post by Termy »

Sorry I got back to you so late. I'm glad you (presumably) at least have a working system now. You already had the module installed, and a viable version, it seems. It should have worked. Maybe that specific file (probably '/usr/share/perl/5.30/File/Find.pm') was for some reason missing.

A module, in this context, is a chunk of code which programmers like myself can use with PERL (a high-level general purpose programming language), to add functionality to their scripts/programs. As the end user, you shouldn't really need to worry about that further than making sure you have the needed modules for what you're wanting to run/install.

In Ubuntu (on which Linux Mint is based) and most other distributions, many of these common and popular modules (for languages like PERL and Python) are installed via packages, which are found in the standard repositories. The 'perl-modules-*' package(s) includes the "core" modules, which are basically a set of what are regarded as essential and oft-desired modules for PERL users, such as File::Find. These modules allow programmers to avoid reinventing the wheel, among other potential bonuses.

My next suggestion would have been to try reinstalling the 'perl-modules-5.30' package you had installed, to ensure the needed files are present. If that hadn't have worked, I'd have suggested the @INC variable was incorrectly set in the script itself, and that your best bet would be to either look into the valid value, or, more realistically, wait until a fix was released for the that SAMBA package.

What I recommend for the future, is that you try to stick it out — try to fix the problem, or try to at least gather a basic understanding of what went wrong. This helps you to understand the operating system and helps you better solve or avoid these sort of problems in the future. Also, understanding these things can very much help when you seek help the next time, as you can better articulate the problem.

Best of luck. :)
I'm also Terminalforlife on GitHub.
pbear
Level 16
Level 16
Posts: 6569
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: apt not working - linux-image failing to process

Post by pbear »

It's moot now, but compare the commands Termy gave with what you actually ran. You made changes, including moshing together apt and apt-get parameters in an invalid way. Terminal is VERY picky. When following instructions, don't wing it. Use copy-and-paste.

FYI, Timeshift is a valuable app. If you're no longer using Mint, it's usually available in repo in other distros.
DMT_1024
Level 2
Level 2
Posts: 61
Joined: Fri May 27, 2022 11:13 pm

Re: apt not working - linux-image failing to process

Post by DMT_1024 »

pbear wrote: Wed Jul 06, 2022 1:52 am It's moot now, but compare the commands Termy gave with what you actually ran. You made changes, including moshing together apt and apt-get parameters in an invalid way. Terminal is VERY picky. When following instructions, don't wing it. Use copy-and-paste.

FYI, Timeshift is a valuable app. If you're no longer using Mint, it's usually available in repo in other distros.
im sorry
but i have copy and pasted all commends
i runned so many commands may be it meshed while copying from terminal , sorry for that

i got no time to post other things i have done
i tried to update chrome by terminal and chrome stopped working
i had 1 snapshot saved of 30 may
after restoring that linux mint was not booting with so many error
i was uable to go in GRUB Menu

I dont have phone with brouser so i was also disconnected from forum

i am still using Mint 20.3 but MATE insted of CINNAMON .
Locked

Return to “Beginner Questions”