[SOLVED] Unable to upgrade the system - Malformed .. source list (snapshot 2.3.2)

  • Platform information:

    • OS: Openhabian just ported on USB (14,4Gb)
      Release = Raspbian GNU/Linux 8 (jessie)
      Kernel = Linux 4.9.35-v7+
      Platform = Raspberry Pi 3 Model B Rev 1.2
      Uptime = 0 day(s). 0:2:56
      CPU Usage = 41.16 % avg over 4 cpu(s) (4 core(s) x 1 socket(s))
      CPU Load = 1m: 6.18, 5m: 3.52, 15m: 1.41
      Memory = Free: 0.72GB (77%), Used: 0.22GB (23%), Total: 0.94GB
      Swap = Free: 0.09GB (100%), Used: 0.00GB (0%), Total: 0.09GB
      Root = Free: 1.86GB (13%), Used: 11.53GB (87%), Total: 14.12GB
      Updates = 0 apt-get updates available.
      Sessions = 1 sessions
      Processes = 147 running processes of 32768 maximum processes
      Apache = Version: 2.4.10
      Nginx = Version: 1.6.2
      PHP = Version: 5.6.33, Memory Limit:
      Version: openHAB 2.3.0~20180121190142-1 (Build #1193)
  • Issue of the topic: unable to upgrade the system (same behaviour with system on SD)

  • If logs where generated please post these here using code fences:

[12:44:15] openhabian@pi:~$ sudo openhabian-config
[sudo] password for openhabian:
2018-05-26_12:44:34_CEST [openHABian] Checking for root privileges... OK
2018-05-26_12:44:35_CEST [openHABian] Loading configuration file '/etc/openhabia                                               n.conf'... OK
2018-05-26_12:44:43_CEST [openHABian] openHABian configuration tool version: [master]v1.4.1-399(47771f8)
2018-05-26_12:45:06_CEST [openHABian] Checking for changes in origin... OK
2018-05-26_12:50:23_CEST [openHABian] Updating myself... OK - No remote changes detected. You are up to date!
2018-05-26_12:50:42_CEST [openHABian] Updating repositories and upgrading installed packages...
$ apt update
E: Malformed line 1 in source list /etc/apt/sources.list (dist)
E: The list of sources could not be read.

$ apt --yes upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
OK
2018-05-26_12:50:49_CEST [openHABian] Checking for default openHABian username:password combination... OK
2018-05-26_12:50:49_CEST [openHABian] We hope you got what you came for! See you again soon ;)
[12:50:49] openhabian@pi:~$

Can you post that file, please?

Hi Vincent
This is the sources.list content (the uploader of the editor refuses the extension .list),The previous upgrade were done without problems. Thanks

deb http://raspbian.mirror.garr.it/mirrors/raspbian/raspbian
#deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi```

@bruno

You may have a rogue hidden character in the first line
Or some corrupt byte on your sd card

  1. write down the first line. (DON’T copy and paste, you would only copy the error)
  2. delete the first line leaving #deb http://mirrordirector… as the first line
  3. save the file
  4. open the file
  5. insert a first line
  6. type the the line you wrote down in the first step

Boot the pi
Try the update

same error, I also deleted completely the file and write again exactly the content using “nano”, but the result is always the same

indeed the result is slightly different

[16:39:58] root@pi:/home/openhabian# openhabian-config
2018-05-26_16:40:17_CEST [openHABian] Checking for root privileges... OK
2018-05-26_16:40:17_CEST [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2018-05-26_16:40:17_CEST [openHABian] openHABian configuration tool version: [master]v1.4.1-399(47771f8)
2018-05-26_16:40:17_CEST [openHABian] Checking for changes in origin... OK
2018-05-26_16:40:24_CEST [openHABian] Updating repositories and upgrading installed packages...
$ apt update
E: Malformed line 1 in source list /etc/apt/sources.list (dist)
E: The list of sources could not be read.

$ apt --yes upgrade
Reading package lists... Error!
E: Malformed line 1 in source list /etc/apt/sources.list (dist)
E: The list of sources could not be read.
E: The package lists or status file could not be parsed or opened.
FAILED

I had forgotten to reboot the system however the result is the same

[16:53:33] openhabian@pi:~$ sudo openhabian-config
[sudo] password for openhabian:
2018-05-26_16:54:07_CEST [openHABian] Checking for root privileges... OK
2018-05-26_16:54:07_CEST [openHABian] Loading configuration file '/etc/openhabia                                              n.conf'... OK
2018-05-26_16:54:14_CEST [openHABian] openHABian configuration tool version: [master]v1.4.1-399(47771f8)
2018-05-26_16:54:14_CEST [openHABian] Checking for changes in origin... Updates available...
2018-05-26_16:54:30_CEST [openHABian] Updating myself... OK - Commit history (oldest to newest):


6f3eccf - Update documentation links (16 hours ago) <Wouter Born> N
 README.md                       |  6 +++---
 docs/openhabian.md              | 24 ++++++++++++------------
 functions/menu.sh               |  2 +-
 functions/openhab.sh            |  2 +-
 functions/packages.sh           |  4 ++--
 includes/bash_profile           |  2 +-
 includes/dashboard-imagedata.sh |  2 +-
 includes/srv_readme.txt         | 12 ++++++------
 openhabian-setup.sh             |  4 ++--
 9 files changed, 29 insertions(+), 29 deletions(-)


openHABian configuration tool successfully updated.
Visit the development repository for more details: https://github.com/openhab/openhabian
The tool will now restart to load the updates...


2018-05-26_16:54:39_CEST [openHABian] Checking for root privileges... OK
2018-05-26_16:54:39_CEST [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2018-05-26_16:54:39_CEST [openHABian] openHABian configuration tool version: [master]v1.4.1-400(6f3eccf)
2018-05-26_16:54:39_CEST [openHABian] Checking for changes in origin... OK
2018-05-26_16:54:53_CEST [openHABian] Updating repositories and upgrading installed packages...
$ apt update
E: Malformed line 1 in source list /etc/apt/sources.list (dist)
E: The list of sources could not be read.

$ apt --yes upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
OK
2018-05-26_16:56:04_CEST [openHABian] Checking for default openHABian username:password combination... OK
2018-05-26_16:56:04_CEST [openHABian] We hope you got what you came for! See you again soon ;)
[16:56:04] openhabian@pi:~$

Try replacing the first line with:

http://mirror.internetone.it/raspbian/raspbian/

it’s another mirror in Italy

I guess always with “deb”
Same result,
trying to upgrade manually?

The error is due to having no distribution or component part of the repo. Each line has to be in the following structure:

deb {url} {distribution} {components}"

Not sure how the last two parts went missing but you would probably be best with:

deb http://raspbian.mirror.garr.it/mirrors/raspbian/raspbian jessie main contrib non-free rpi

instead of your first line.

Now it works, however I do not understand why it worked previously with the wrong command (for sure I did not change the file)
Many thanks