CAn't Update with apt-get

New to Debian (Or Linux in general)? Ask your questions here!

CAn't Update with apt-get

Postby AlexKillometer » 2020-07-29 02:26

I receive error messages when I try to update with apt-get. Incidental problems that may be related include inability to launch a terminal window. I do all my commands from ALT+CTRL+F5, which launches a second login instance.

Please review below attempts:
Upgrading with Apt-get displays error setting locale, exits looking for ldconfig
I cannot generate locales, command not found
installing just locales exits at message of having held broken packages.

****UPDATES****
Apt-get states there are broken packages or unmet dependencies after attempting to install new packages, but attempting to fix the broken packages with DPKG not APT-GET show any actual broken of held packages.

Used cammands that returned no problem packages:
sudo apt-get update --fix-missing
sudo apt-get install -f
sudo dpkg –configure -a

Please direct me where to look at next.


Error:
Code: Select all
sudo apt-get upgrade
(Removed list of packages downloaded from sourcelists)

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
   LANGUAGE = (unset),
   LC_ALL = (unset),
   LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17.

Extracting templates from packages: 100%
Preconfiguring packages ...
dpkg: warning: 'ldconfig' not found in PATH or not executable
dpkg: error: 1 expected program not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)


So I tried to install locales
Code: Select all
apt-get install locales
Reading package lists... Done
Building dependency tree       
Reading state information... Done

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 locales : Depends: debconf (>= 0.5) but it is not going to be installed or
                    debconf-2.0
E: Unable to correct problems, you have held broken packages.


I tried to generate Locale and then reconfigure
Code: Select all
sudo locale-gen
-bash: locale-gen: command not found

dpkg-reconfigure locales
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
   LANGUAGE = (unset),
   LC_ALL = (unset),
   LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17.
/usr/sbin/dpkg-reconfigure: locales is broken or not fully installed


I read that this fixes broken packages so i tried it to no effect
Code: Select all
sudo apt install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 252 not upgraded.



/etc/default/locale contents
Code: Select all
LANG="en_US.UTF-8"


locale.gen contents show en_US.UTF-8 uncommented

Source list:
Code: Select all
deb http://deb.debian.org/debian/ stretch main contrib non-free
deb-src http://deb.debian.org/debian/ stretch non-free contrib main

deb http://deb.debian.org/debian/ stretch-updates main contrib non-free
deb-src http://deb.debian.org/debian/ stretch-updates main contrib non-free

deb http://security.debian.org/debian-security/ stretch/updates main contrib non-free
deb-src http://security.debian.org/debian-security/ stretch/updates non-free contrib main
Last edited by AlexKillometer on 2020-07-29 17:21, edited 1 time in total.
AlexKillometer
 
Posts: 7
Joined: 2020-07-29 01:44

Re: CAn't Update with apt-get

Postby sickpig » 2020-07-29 04:21

Code: Select all
dpkg: warning: 'ldconfig' not found in PATH or not executable

seems path related. See if you can
Code: Select all
su -
to fix it.
also you can comment out the deb-src in your sources.list if you are not downloading src files to build packages.
User avatar
sickpig
 
Posts: 412
Joined: 2019-01-23 10:34

Re: CAn't Update with apt-get

Postby Deb-fan » 2020-07-29 04:54

Have to start abiding by a 5 or so post per day limit here. Am letting gnu/Linux forum addiction rear it's ugly, ugly head !!!! Noooooooo ! :)

Cannot open a terminal, you have to switch to another tty to run commands ? Errrr, you've clearly got bigger issues than locales (looks normal to me)or inablility to upgrade the OS. Am going to assume this somehow (at least in part)stems from Debian lacking nonfree software support out-of-box. Have you tried any Debian "based" which do include that, if so which ? A couple I'm fond of for whichever reasons, Mx gnu/Linux and Bunsenlabs gnu/Linux.

Other random junk, don't use apt-get anymore, command now is simply apt ie: "sudo apt install, upgrade etc" If you aren't using a REALLY dated version of apt anyway. So apt-get and apt-cache are things of the past and people may as well use the newer/better syntax. Many times, esp if a gnu/Nix OS hasn't been upgraded in a long time would encourage people to start using this newerish command "sudo apt full-upgrade", the differences between what it does vs simple upgrade are readily available knowledge to be found on the webz, man pages "man apt" ... whatever.

Do you have a root user ? If so what happens when you try upgrading under that acct or use "sudo su -", "sudo -i" or whichever, then try to upgrade(nevermind, see OOPS below), try and see. Mostly just curious. Is the system even online ? Try "ping -c 3 www.google.com" see if you can even ping anything. Upgrade would also be sort of difficult on a system which isn't even online. Would/could also post some hardware specs for people to review.

Looks like the output for "sudo apt install -f" is saying there's nothing for it to fix and your sources.list to me looks totally normal. OOPS, there's your trouble, looks normal for Stretch, Debian 9, that's now oldstable, no doubt the respositories you're trying to install pkgs from don't even exist anymore, thus yeah, apt's having trouble downloading and installing stuff from them. Someone has to have/show care when monkey'ing around with software respositories. How repositories are named in sources.list. Why are you trying to install Stretch, with Buster, Debian 10 being latest Debian stable ?
Last edited by Deb-fan on 2020-07-29 08:37, edited 2 times in total.
Most powerful FREE tech-support tool on the planet * HERE. *
Deb-fan
 
Posts: 814
Joined: 2012-08-14 12:27

Re: CAn't Update with apt-get

Postby AlexKillometer » 2020-07-29 06:13

sickpig wrote:
Code: Select all
dpkg: warning: 'ldconfig' not found in PATH or not executable

seems path related. See if you can
Code: Select all
su -
to fix it.
also you can comment out the deb-src in your sources.list if you are not downloading src files to build packages.


using "su -" created a password prompt for the super user. I assume your looking for what elevated privileges do to commands. It looks like I don't remember my password for the su.
AlexKillometer
 
Posts: 7
Joined: 2020-07-29 01:44

Re: CAn't Update with apt-get

Postby AlexKillometer » 2020-07-29 06:14

Deb-fan wrote:Have to start abiding by a 5 or so post per day limit here. Am letting gnu/Linux forum addiction rear it's ugly, ugly head !!!! Noooooooo ! :)

Cannot open a terminal, you have to switch to another tty to run commands ? Errrr, you've clearly got bigger issues than locales (looks normal to me)or inablility to upgrade the OS. Am going to assume this somehow (at least in part)stems from Debian lacking nonfree software support out-of-box. Have you tried any Debian "based" which do include that, if so which ? A couple I'm fond of for whichever reasons, Mx gnu/Linux and Bunsenlabs gnu/Linux.

Other random junk, don't use apt-get anymore, command now is simply apt ie: "sudo apt install, upgrade etc" If you aren't using a REALLY dated version of apt anyway. So apt-get and apt-cache are things of the past and people may as well use the newer/better syntax. Many times, esp if a gnu/Nix OS hasn't been upgraded in a long time would encourage people to start using this newerish command "sudo apt full-upgrade", the differences between what it does vs simple upgrade are readily available knowledge to be found on the webz, man pages "man apt" ... whatever.

Do you have a root user ? If so what happens when you try upgrading under that acct or use "sudo -su", "sudo -i" or whichever, then try to upgrade(nevermind, see OOPS below), try and see. Mostly just curious. Is the system even online ? Try "ping -c 3 http://www.google.com" see if you can even ping anything. Upgrade would also be sort of difficult on a system which isn't even online. Would/could also post some hardware specs for people to review.

Looks like the output for "sudo apt install -f" is saying there's nothing for it to fix and your sources.list to me looks totally normal. OOPS, there's your trouble, looks normal for Stretch, Debian 9, that's now oldstable, no doubt the respositories you're trying to install pkgs from don't even exist anymore, thus yeah, apt's having trouble downloading and installing stuff from them. Someone has to have/show care when monkey'ing around with software respositories. How repositories are named in sources.list. Why are you trying to install Stretch, with Buster, Debian 10 being latest Debian stable ?


Hi You sound like you are trying to help, but I have no idea what you are asking me to do. Your comments are kinda all over the place.
AlexKillometer
 
Posts: 7
Joined: 2020-07-29 01:44

Re: CAn't Update with apt-get

Postby sickpig » 2020-07-29 06:24

AlexKillometer wrote:using "su -" created a password prompt for the super user. I assume your looking for what elevated privileges do to commands. It looks like I don't remember my password for the su.


http://forums.debian.net/viewtopic.php?f=16&t=146740 see if you can reset using that.
User avatar
sickpig
 
Posts: 412
Joined: 2019-01-23 10:34

Re: CAn't Update with apt-get

Postby Deb-fan » 2020-07-29 06:31

Install current Debian stable, Debian 10, named Buster, not Debian 9, aka: Stretch. :)
Most powerful FREE tech-support tool on the planet * HERE. *
Deb-fan
 
Posts: 814
Joined: 2012-08-14 12:27

Re: CAn't Update with apt-get

Postby cuckooflew » 2020-07-29 07:52

https://www.debian.org/releases/stretch/
Debian 9 has been superseded by Debian 10 ("buster"). Security updates have been discontinued as of July 6th, 2020.

However, stretch benefits from Long Term Support (LTS) until the end of June 2022. The LTS is limited to i386, amd64, armel, armhf and arm64. All other architectures are no longer supported in stretch. For more information, please refer to the LTS section of the Debian Wiki.


The packages are still available but have probably been moved to "archives" Off hand I am not sure what change needs to be made in your sources.list to access them, maybe someone else can tell you , I tried searching for better info, but did not find anything,

If sudo is working, you can use sudo to change or set the root password,
Code: Select all
sudo passwd root


Yes, you might want to consider installing Debian Stable (Buster), but you should still be able to upgrade to it, as well.
Last edited by cuckooflew on 2020-07-29 13:15, edited 1 time in total.
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
…one flew east, one flew west,
One flew over the cuckoo’s nest.
cuckooflew
 
Posts: 551
Joined: 2018-05-10 19:34
Location: Some where out west

Re: CAn't Update with apt-get

Postby Deb-fan » 2020-07-29 08:24

See stuff like ...

https://wiki.debian.org/SourcesList

And ...

https://wiki.debian.org/DebianOldStable

If remember Stretch is supported until 2022? Are sure to be times when using oldstable is valid, I still prefer using a Stretch install vs the Buster install on my crusty old laptop, no valid or overriding reason though. Absent some valid reason think people should use Buster and without a good reason should also follow the advised best practice of doing a fresh Buster install rather than trying to upgrade Stretch to it/Buster.
Most powerful FREE tech-support tool on the planet * HERE. *
Deb-fan
 
Posts: 814
Joined: 2012-08-14 12:27

Re: CAn't Update with apt-get

Postby AlexKillometer » 2020-07-29 15:49

AlexKillometer wrote:
sickpig wrote:
Code: Select all
dpkg: warning: 'ldconfig' not found in PATH or not executable

seems path related. See if you can
Code: Select all
su -
to fix it.
also you can comment out the deb-src in your sources.list if you are not downloading src files to build packages.


using "su -" created a password prompt for the super user. I assume your looking for what elevated privileges do to commands. It looks like I don't remember my password for the su.



I received a Token Manipulation Error when attempting to change the password with passwd. I saw there are a few ways to try from this link, so I will see if those help.
https://www.tecmint.com/fix-passwd-auth ... -in-linux/

** another users suggestion of sudo passwd root allowed th SU pasword to change. this new level of access did not change the outcome for the apt-get upgrade command
AlexKillometer
 
Posts: 7
Joined: 2020-07-29 01:44

Re: CAn't Update with apt-get

Postby AlexKillometer » 2020-07-29 16:14

cuckooflew wrote:https://www.debian.org/releases/stretch/
Debian 9 has been superseded by Debian 10 ("buster"). Security updates have been discontinued as of July 6th, 2020.

However, stretch benefits from Long Term Support (LTS) until the end of June 2022. The LTS is limited to i386, amd64, armel, armhf and arm64. All other architectures are no longer supported in stretch. For more information, please refer to the LTS section of the Debian Wiki.


The packages are still available but have probably been moved to "archives" Off hand I am not sure what change needs to be made in your sources.list to access them, maybe someone else can tell you , I tried searching for better info, but did not find anything,

If sudo is working, you can use sudo to change or set the root password,
Code: Select all
sudo passwd root


Yes, you might want to consider installing Debian Stable (Buster), but you should still be able to upgrade to it, as well.


Hi Cucko, "One Flew over the Cuckoo's Nest" was a favorite during my formative years, btw.

I was able to enable SU access with this suggestion, however it did not change the result of my commands. I can always try to upgrade to Debian 10, but the problem is not the local reception of packages. I have already downloaded all available updates from my current sourcelist. I cannot install them, however. Is there some method of applying updates for Debian 10 that could create a different outcome?
AlexKillometer
 
Posts: 7
Joined: 2020-07-29 01:44

Re: CAn't Update with apt-get

Postby cuckooflew » 2020-07-29 17:42

Since Debian Stretch has moved to LTS (Long Term Support), you need to modify/edit your /etc/apt/source.list as shown in the link below:
https://wiki.debian.org/LTS/Using
The current LTS version is Debian 9 stretch and will be supported from 2020-07-06 to 2022-06-30. To receive security updates, your /etc/apt/sources.list should look like this one:
Code: Select all
deb http://deb.debian.org/debian/ stretch main contrib non-free
deb-src http://deb.debian.org/debian/ stretch main contrib non-free

deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src http://security.debian.org/ stretch/updates main contrib non-free

----snip, but please do read the entire wiki page, there is more details.-----

That package may have "unsupported" dependencies, and this is why your error message is saying:
---partial--Some packages could not be installed. This may mean that you have requested an impossible situation

From the same,link I posted above:
Check for unsupported packages

Not all packages of the Debian archive are supported by LTS. To check whether you have unsupported packages installed on your machine, please install the debian-security-support package (use the version in stretch, unstable will not work as expected). A check for new unsupported packages is run every time packages are installed. You can also run the 'check-support-status' utility manually to get a list of all unsupported packages installed on your system.


AlexKillometer>> Is there some method of applying updates for Debian 10 that could create a different outcome?

You could probably still upgrade to Debian 10, but you should not try mixing Debian 10 , with Debian 9, see: https://wiki.debian.org/DontBreakDebian
If you're trying to install software that isn't available in the current Debian Stable release, it's not a good idea to add repositories for other Debian releases. The problems might not happen right away, but the next time you install updates.

There might be a way to use the Debian 10 updates, but that is much more advanced then what I can help you with, that is to say I have never tried doing something like that, but it seems like I have seen posts where other have tried,
I think in most cases it resulted in a broken system, ...So your best option really is to try to do a full upgrade, there is detailed instructions here:
https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.html
Some of the details may not apply to you, it appears complicated , etc, but really isn't that bad, the first time though is more difficult, you really need to read the instructions carefully, and if there is any part you are not sure about, ask here before trying it. Many users think it is just easier to do a fresh install, and in some cases it is,
Either way, you need to be sure to make a good back up /copy of all the important data , that you need to save,.....that could be a entirely new topic if you need help with how to make a backup,etc, but if you do need help with that , please do start a new topic for that.
Sorry I am not really able to help more, someone else might know of a way to get the package or packages you need from Debian 10, but I think you could just make your backup and do the upgrade faster,...
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
…one flew east, one flew west,
One flew over the cuckoo’s nest.
cuckooflew
 
Posts: 551
Joined: 2018-05-10 19:34
Location: Some where out west

Re: CAn't Update with apt-get

Postby Deb-fan » 2020-07-30 00:30

Nope of course no insight into why Op is opting to use a Stretch install(badly broken apparently, cant open a terminal, errr wth?)
Most powerful FREE tech-support tool on the planet * HERE. *
Deb-fan
 
Posts: 814
Joined: 2012-08-14 12:27

Re: CAn't Update with apt-get

Postby stevepusser » 2020-07-30 03:14

Ummm...that suggested sources.list for Stretch shows no changes, which is correct. You won't need to change it until it reaches EOl in a couple years. It was Debian 8 "Jessie" that recently hit EOL and needed changes to the addresses.

OP, just save your data if you have any, and install Debian 10 as suggested many times.

I also have a feeling you broke your system by doing things that you haven't told us, perhaps by trying to install incompatible debs with dpkg instead of apt, or adding incompatible repos.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: LibreOffice 7.0.0, QMPlay2 20.07.04, Pale Moon 28.12.0, KeepassXC 2.6.0, Arqiver 0.6.0+git, Foliate 2.4.2
User avatar
stevepusser
 
Posts: 11891
Joined: 2009-10-06 05:53

Re: CAn't Update with apt-get

Postby AlexKillometer » 2020-08-01 22:59

stevepusser wrote:Ummm...that suggested sources.list for Stretch shows no changes, which is correct. You won't need to change it until it reaches EOl in a couple years. It was Debian 8 "Jessie" that recently hit EOL and needed changes to the addresses.

OP, just save your data if you have any, and install Debian 10 as suggested many times.

I also have a feeling you broke your system by doing things that you haven't told us, perhaps by trying to install incompatible debs with dpkg instead of apt, or adding incompatible repos.



Hey Steve, I'm not sure what you were trying to do, interjecting to repeat advice that, in your own words, were "suggested many times". This was not helpful. Continuing on, as you did, worried about the things I "havent'y told [you]" is a curious way of dismissing my problems, and avoids offering a better solution. I had already decided to retry installing debian 10 as in a fresh new system before your comments. It didn't seem to occur to you that I HAD already explored this option, and that my decision to post here COULD have been to weigh the costs in time of both. I don't visit these forums much, but if your posts contain any constructive advice on other subjects, I would be glad to learn from them. Thank you.
AlexKillometer
 
Posts: 7
Joined: 2020-07-29 01:44

Next

Return to Beginners Questions

Who is online

Users browsing this forum: Head_on_a_Stick and 6 guests

fashionable