OH2 on RPi3

Hi guys.

I just got a RPi3 and was trying to install OH2 through APT as per http://docs.openhab.org/installation/apt.html

At step 4 (resync package index) I get the following error:

pi@zeus:~ $ sudo apt-get update
Hit http://mirrordirector.raspbian.org jessie InRelease
Ign http://dl.bintray.com stable InRelease
Ign http://dl.bintray.com stable Release.gpg
Hit http://archive.raspberrypi.org jessie InRelease
Ign http://dl.bintray.com stable Release
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages
Err http://dl.bintray.com stable/main armhf Packages
404 Not Found [IP: 75.126.118.188 80]
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages
Ign http://dl.bintray.com stable/main Translation-en_GB
Ign http://dl.bintray.com stable/main Translation-en
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
W: Failed to fetch http://dl.bintray.com/openhab/apt-repo2/dists/stable/main/binary-armhf/Packages 404 Not Found [IP: 75.126.118.188 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.

Iā€™m wondering if the OH2 repo is not available for RPi yet?

TIA

If you take a look at

http://dl.bintray.com/openhab/apt-repo2/dists/

you will find that the stable folder is missing at the moment (maybe someone is working on it?).

Only testing and 2.0.0.b3 are available ā€¦

Ok, so I guess Iā€™ll have to wait :pensive:

Thanks

Or in the meantime use the official beta 3 ā€¦

See also this post:

maybe there is a little misunderstanding in the docs which version is beta and which version is testing or nightlies (looks like beta is nightly repo and stable is beta3 ā€¦)

1 Like

So, this line:

ā€˜deb http://dl.bintray.com/openhab/apt-repo2 stable mainā€™

should look like:

ā€˜deb http://dl.bintray.com/openhab/apt-repo2 2.0.0.b3 mainā€™

?

Yes :grin:

2 Likes

@theo Should maybe the documentation be enhanced a bit to rule out misunderstandings?

Iā€™ll try to clarify things:
According to my understanding the first stable release will be 2.0.0 - without any beta in the version number. Any beta release is a ā€œtestingā€ release. Therefore currently no packages for ā€œstableā€ are available.

As long as only beta releases are available use:
deb http://dl.bintray.com/openhab/apt-repo2 testing main

There are further expert options:

If you want to stick with a specific openHAB version and prevent automatic updates as soon as apt-get update && apt-get upgrade is called, neither use ā€œtestingā€ nor ā€œstableā€ as distribution name but use the version number. For now ā€œ2.0.0.b3ā€ is the only valid option. In most cases you donā€™t use the repo this way, because you have to change your apt-sources-list for getting newer releases.

There are also two repos hosting snapshot - not nightly - builds. In respect to the bintray repo these are completly different repositories according to the repo url and structure. Snapshots are not hosted at bintray because bintray doesnā€™t support snapshot builds. Furthermore the snapshot repos use the ā€œtrivialā€ apt repository layout and there are seperate repos for the ā€œopenhab-onlineā€ and the ā€œopenhab-offlineā€ package. The repos are created on every build. Iā€™m not sure but I think builds are triggert by any changes to master branch of the openHAB git repository. The repos are missing as long as a build is running, because they are wiped out at the beginning of the maven build and created at the end of the build. You will get errors if you try an installation within the timeslot of a running build.

If you want to use these repos add one of this line in your sources list file - make sure to remove the bintray repository from your sources list.

You can test the current snapshot of the offline distribution by adding this line to your apt-sources:

deb https://openhab.ci.cloudbees.com/job/openHAB-Distribution/ws/distributions/openhab-offline/target/apt-repo/ /

or the online distribution by adding that line:

deb https://openhab.ci.cloudbees.com/job/openHAB-Distribution/ws/distributions/openhab-online/target/apt-repo/ /

As soon as 2.0.0 is released there will be a ā€œstableā€ distribution. Most users will change their apt-sources list to:

deb http://dl.bintray.com/openhab/apt-repo2 stable main

Iā€™ll make a PR for the docs.

Regards,
Theo

1 Like

Than you @theo, you were very clear with your explanation. Iā€™ll proceed as you described.

Is there a way to update the b3 to the latest SNAPSHOT? Because apt-get update && apt-get upgrade always tells me everything is up to date.

1 Like

Now i get the following error while apt-get update

W: Fehlschlag beim Holen von gzip:/var/lib/apt/lists/partial/openhab.ci.cloudbees.com_job_openHAB-Distribution_ws_distributions_openhab-online_target_apt-repo_Packages.gz UngĆ¼ltiges Dateiformat

Error catching file. Wrong fileformat.
Ermā€¦any suggestions?
Is it because i had the normal testing debs in the sources list?

Okay now i got it working by simply downloading the .deb and dpkg -i it.