Issue of the topic: [openHABian] Updating repositories and upgrading installed packages… FAILED
I found sometimes “mirrordirector.raspbian.org” is not working and you installation fails on the apt-get update / upgrade.
I got stuck 3 times until I found what was happening I want to share my fix (really simple) to avoid you to spend time looking for solution on Internet.
The error is: Updating repositories and upgrading installed packages… FAILED on the log file:
/boot/first-boot.log
The easy way is to connect your SD after image format to a linux computer, look for the apt-get sources (sources.list) and modify the http for a functional URL.
The other way is to wait to fail the installation, use ssh to connect to the raspberry and modify then the sources.list.
2018-08-12_04:49:18_UTC [openHABian] Storing configuration… OK
2018-08-12_04:49:18_UTC [openHABian] Changing default username and password… SKIPPED
2018-08-12_04:49:18_UTC [openHABian] Setting up Ethernet connection… OK
2018-08-12_04:49:18_UTC [openHABian] Ensuring network connectivity… OK
2018-08-12_04:49:18_UTC [openHABian] Waiting for dpkg/apt to get ready… OK
2018-08-12_04:49:26_UTC [openHABian] Updating repositories and upgrading installed packages… FAILED
2018-08-12_04:49:32_UTC [openHABian] Initial setup exiting with an error!
From the file ‘first-boot.sh’, commented the entire section
[openHabian] Updating repositories and upgrading install packages…
…
…
echo “FAILED”; fail in_progress; fi
After that, again I get the same logs…
2018-08-12_04:49:18_UTC [openHABian] Storing configuration… OK
2018-08-12_04:49:18_UTC [openHABian] Changing default username and password… SKIPPED
2018-08-12_04:49:18_UTC [openHABian] Setting up Ethernet connection… OK
2018-08-12_04:49:18_UTC [openHABian] Ensuring network connectivity… OK
2018-08-12_04:49:18_UTC [openHABian] Waiting for dpkg/apt to get ready… OK
2018-08-12_04:49:26_UTC [openHABian] Updating repositories and upgrading installed packages… FAILED
2018-08-12_04:49:32_UTC [openHABian] Initial setup exiting with an error!
This indicates, my changes did not take place.
Img: openhabianpi-raspbian-201804031720-gitdba76f6-crc9e93c3eb.img
Raspberry Pi 3 B Model
32GB SD card - Sandisk
I used Ubuntu 16-04 . I had inserted the SD card (using a USB) into Ubuntu, make changes to the sources.list and first-boot.sh and booted Pi3 again.
Any help in this direction would be appreciated !!
Never had this issue installing openhabian but here is a screen shot of my sources file. You may can copy the repo source and get it working. I do see you are using jessie and this is for stretch, it’ll either work or it won’t…
You may also be able to sudo openhabian-config and use the tools of openhabian. Look thru the options and find update or install the latest.
Hi All,
It turned out the issue was due to Incorrect Power Adapter.
I used a Power Adapter with Higher Current rating and everything started working properly.
I recommend the power supply that comes with the RPI kit, 5v 2.5A. Using a 2A adapter may not be reliable, some list 2A but are really 1.7A. Just something to keep in mind.
The issue on this post can be found in several other topics with the solution being to replace the power supply.
SOLVED!
I’m using OpenHabian on RaspPi3, I found sources.list file after installing comes wrong. The linux version is “stretch” and source doesn’t match with any, no mather how many times you reload it, or change the power supply. So I modified the file and is working now as this:
I had the same issue and like @metin I could solve it by doing a simple reboot.
Additional info to other beginners: You can exit the displayed “firstboot.log” by pressing ctrl + d or ctrl + c (not sure). Then you are back on the console and you can do sudo reboot.
openhabian@openHABianPi:~$sudo apt upgrade Results in:
Reading package lists… Done
Building dependency tree
Reading state information… Done You might want to run ‘apt --fix-broken install’ to correct these. The following packages have unmet dependencies: apt-utils : Depends: apt (= 1.4.8) but 1.4.9 is installed E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).
openhabian@openHABianPi:~$sudo apt --fix-broken install Results in:
Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following additional packages will be installed:
apt-utils
The following packages will be upgraded:
apt-utils
1 upgraded, 0 newly installed, 0 to remove and 78 not upgraded.
8 not fully installed or removed.
Need to get 0 B/392 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Don’t be afraid to see warnings about missing locale information, as those are not show stoppers.
Now the broken update/upgrade process should be fixed. Time to reboot the Pi: openhabian@openHABianPi:~$sudo reboot now
This at least saved my broken first-boot process.
Probably /boot/first-boot.sh should be modified to run apt --fix-broken install before running apt upgrade