New install problems

I’m trying to move from OpenHAB 1.8 to OpenHAB 2 on a raspberry pi 3 with the latest image but I’m getting an error when running the apt-get install. I followed the steps under the linux install instructions on the OpenHAB 2 documentation and I updated the repositories and the public key without any issues. When I run the commend “sudo apt-get install openhab2-offline” though I get the following after download:

dpkg: error processing archive /var/cache/apt/archives/openhab2-offline_2.0.0-20161017033125_all.deb (–unpack):
subprocess new pre-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)

Am I doing something wrong or is there an issue with the archive server at the moment?

Thanks,
Matt

There’s nothing that you’re doing wrong! There is indeed an issue which is in the process of being fixed (just waiting on a merge), try the following:

sudo mkdir -p /var/lib/openhab2/cache
sudo mkdir -p /var/lib/openhab2/tmp
sudo apt-get install openhab2-offline
sudo chown -R openhab:openhab /var/lib/openhab2

2 Likes

Can verify this resolved the problem for me. RaspPi2

Yeah that seems to have resolved the issue! Thanks for the help! Sorry for the delay, this was the first chance I could test it.

@Duncan_Pullen, @mladams922, If you experience further problems you may want to make sure that the openhab user/group owns the folder, since we were the ones to create it not openhab:

sudo chown -R openhab:openhab /var/lib/openhab2

I did that and it resolved some of the startup issues I was having as well. Now it seems to be running ok with the exception of a few things I need to troubleshoot.

Thanks for the help!