- Platform information: Rasp3
- Hardware: ARM/Rasp3
- OS: openHABian
- openHAB version: 2.0 stable
- 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:
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.
Anyway, you must do the next steps:
- Go to https://www.raspbian.org/RaspbianMirrors for any valid mirror trying it in your browser
- Edit the sources list:
sudo vi /etc/apt/sources.list
- Comment the first line:
#deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
- Add a new line using one of the web page working mirrors. I used as example:
deb http://ramses.wh2.tu-dresden.de/pub/mirrors/raspbian/raspbian/ jessie main contrib non-free rpi
- Now simply reboot the raspberry:
Now the installation process will continue after a OK on the updated packages.