Backup and update not working.

If none of the more specific forums is the right place to ask

Re: Backup and update not working.

Postby cuckooflew » 2020-09-04 02:15


-> so how it is possible that apt reports an error at line 26?

Something smells here ...

I notice that here: http://forums.debian.net/viewtopic.php?f=17&t=147204#p726538
The /etc/apt/sources.list file does have more the 26 lines, 28 to be exact... Any way, I agree,
You said you cleaned it up, but apparently the cleaning went awry.

Is probably what happened, I wonder if the OP also ran 'apt update' after editing the file ?
Probably would be best to delete/remove the old one, and start fresh with a good sources.list file , EG: the example shown here
sgosnell wrote:Try this. You don't need the source code, so comment those out to save time and bandwidth.
Code: Select all
deb http://ftp.us.debian.org/debian/ buster main contrib
#deb-src http://ftp.us.debian.org/debian/ buster main contrib
deb http://security.debian.org/debian-security/ buster/updates main contrib
#deb-src http://security.debian.org/debian-security/ buster/updates main contrib

# buster-updates, previously known as 'volatile'
deb http://deb.debian.org/debian/ buster-updates main contrib
#deb-src http://deb.debian.org/debian/ buster-updates main contrib 
Get rid of everything else. There may be stray unprintable characters in the file somewhere.

Be sure to run 'apt update' after replacing or editing the file, if you don't do that the changes will not take effect, and you will still get the same error. I guess apt stores the file in some cache or something, and does not refresh that, until 'apt update' is run, in other words it must be updated first.
Something similar happened to me years ago, after I edited my sources.list file, it still said it could not find the repository I had added, I double checked, and yes I had added the lines I needed, so I was baffled, and started reading the "apt-get" documentation, and also searching, some where it was mentioned that 'apt-get update' needed to be run, in order to update it.
========================
It was this: https://www.debian.org/doc/manuals/apt-howto/ch-basico.en.html
Do not forget to run apt-get update after modifying the /etc/apt/sources.list file. You must do this to let APT obtain the package lists from the sources you specified.

It is now "obsolete " but uses debian stable as the example, ...
Also the manual says:
https://manpages.debian.org/buster/apt/sources.list.5.en.html
The information available from the configured sources is acquired by apt-get update (or by an equivalent command from another APT front-end).

Not as clear as the older documentation, and I don't see any where on the debian wiki where they mention it,... seems like it used to, but any way that is another topic,...
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"
and
Just say NO to help vampires!
cuckooflew
 
Posts: 681
Joined: 2018-05-10 19:34
Location: Some where out west

Re: Backup and update not working.

Postby LE_746F6D617A7A69 » 2020-09-04 07:58

sgosnell wrote:Apt also reads files in etc/apt/sources.list.d. Check if there are iany files in that directory, and if so, please post them. Seeing your history, I would bet a small sum that there are leftover files there, perhaps from the Ubuntu PPAs or other installed packages.
That could be possible, but the error message is:
Gnigma wrote:E: Malformed entry 26 in list file /etc/apt/sources.list (Component)
E: The list of sources could not be read.
The hex dump showed that the encoding is correct, there are no invisible characters, and there are really only 20 lines of text -> so it's obvious that the error message has been generated for some other version of sources.list ...
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 426
Joined: 2020-05-03 14:16

Re: Backup and update not working.

Postby sgosnell » 2020-09-04 16:18

When apt does an update, it reads and concatenates sources.list plus the files in sources.list.d. At least that's my understanding. I've seen this happen when the error was in one of the files in sources.list.d, but the output in the terminal did not specify the file. The concatenated total is treated as one file, AFAIK.
Take my advice, I'm not using it.
sgosnell
 
Posts: 974
Joined: 2011-03-14 01:49

Re: Backup and update not working.

Postby LE_746F6D617A7A69 » 2020-09-04 21:11

sgosnell wrote:When apt does an update, it reads and concatenates sources.list plus the files in sources.list.d. At least that's my understanding. I've seen this happen when the error was in one of the files in sources.list.d, but the output in the terminal did not specify the file. The concatenated total is treated as one file, AFAIK.

Yes, finally all the entries are used to download the updates, but in case if /etc/apt/sources.list.d/some_sources.list is malformed the error message would be:
E: Malformed line X in source list /etc/apt/sources.list.d/some_sources.list

I've just double-checked this - and this is not the case here.

EDIT !
I've just realized that the error message is different from the message reported by OP: different APT version? - definitely not Buster!
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 426
Joined: 2020-05-03 14:16

Re: Backup and update not working.

Postby cuckooflew » 2020-09-04 21:26

I just realized, kind of dumb on my part, obviously if there is a "mal formed" line, then one would not be able to run
Code: Select all
apt udate
after editing it.
The OP should show us again, what they actually have in both
Code: Select all
 /etc/apt/sources.list
and in:
Code: Select all
/etc/apt/sources.list.d/some_sources.list
But also use code boxes, to be sure it is clear.
I would just start with the first 3 basic, and essential sources, then add the additional lines as needed, run apt update each time, if and when it gets a line that breaks it again, it is easy to know it was that line, it needs to be corrected. Hope that makes sense, or in reverse start removing lines, until they get something that works,
so it's obvious that the error message has been generated for some other version of sources.list ...

Maybe there are some things the OP is not telling us, or a prankster has messed with their system and they don't know it :?: :mrgreen: :?:
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"
and
Just say NO to help vampires!
cuckooflew
 
Posts: 681
Joined: 2018-05-10 19:34
Location: Some where out west

Previous

Return to General Questions

Who is online

Users browsing this forum: No registered users and 11 guests

fashionable