JimmyStewart's picture

I am trying to update Zonminder from 1.34.x to the new 1.36.x with the new package just released. It appears the new package can not be installed. I get the following errors:

root@zoneminder ~# apt update
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://security.debian.org buster/updates InRelease
Hit:3 http://download.zerotier.com/debian/buster buster InRelease
Ign:4 http://archive.turnkeylinux.org/debian buster-security InRelease
Ign:5 http://zmrepo.zoneminder.com/debian/release-1.36 buster/ InRelease
Ign:6 http://archive.turnkeylinux.org/debian buster InRelease
Hit:7 http://zmrepo.zoneminder.com/debian/release-1.36 buster/ Release
Hit:8 http://archive.turnkeylinux.org/debian buster-security Release
Hit:9 http://archive.turnkeylinux.org/debian buster Release
Reading package lists... Done
Building dependency tree
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
root@zoneminder ~# apt install zoneminder
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 zoneminder : Depends: libavcodec58 (>= 7:4.4)
              Depends: libavformat58 (>= 7:4.4) but 7:4.1.10-0+deb10u1 is to be installed
              Depends: libavutil56 (>= 7:4.4) but 7:4.1.10-0+deb10u1 is to be installed
              Depends: libc6 (>= 2.34) but 2.28-10+deb10u2 is to be installed
              Depends: libgcc-s1 (>= 3.3.1) but it is not installable
              Depends: libgcrypt20 (>= 1.9.0) but 1.8.4-5+deb10u1 is to be installed
              Depends: libgnutls30 (>= 3.7.0) but 3.6.7-4+deb10u10 is to be installed
              Depends: libjpeg8 (>= 8c) but it is not installable
              Depends: libmysqlclient21 (>= 8.0.11) but it is not installable
              Depends: libstdc++6 (>= 12) but 8.3.0-6 is to be installed
              Depends: libswresample3 (>= 7:4.4) but 7:4.1.10-0+deb10u1 is to be installed
              Depends: libswscale5 (>= 7:4.4) but 7:4.1.10-0+deb10u1 is to be installed
E: Unable to correct problems, you have held broken packages.
 

Forum: 
Tags: 
Jeremy Davis's picture

Hi Jimmy, thanks for reporting. I'm assuming from the output that you've posted that you followed my instructions from our discussion over on GiitHub.

I'll have a look in a sec (I'll install our ZoneMinder v16.x app locally and step through the upgrade myself), but from a glance, I'm almost certain that the issue is the pinning file that I recommended you include.

FYI, the point of pinning is a security measure. It only allows specific packages to be installed from a third party repo. It reduces the chances of core OS components being replaced by bad builds inadvertently (e.g. if someone malicious gets control of the Zoneminder repo - perhaps unlikely, but possible). However, in this case, it appears to be stopping you from upgrading ZoneMinder.

If you're in a rush and just want to get the newer version installed, you could try disabling/removing the pinning file. I.e.:

# to disable:
mv /etc/apt/preferences.d/zoneminder.pref /etc/apt/preferences.d/zoneminder.pref.disabled

# OR delete completely:
rm /etc/apt/preferences.d/zoneminder.pref

Then, retry:

apt update
apt install zoneminder

Your post has also prompted me to consider the existing v17.x users. I should write up how they can upgrade too. But I won't hijack your thread here for that purpose.

Assuming that I can work it out, I'll be back soon with some instructions. Either way, I'll aim to give you an update within the next hour or 2.

JimmyStewart's picture

Yes sir I followed your instructions to the "T" in fact went thru 2nd time using the cut and paste code just in case I left something out.

After the 3rd try from the start, I decided it was beyond my Novice knowledge.

Thanks for your support and directing me to the correct support forum.

Jeremy Davis's picture

Unfortunately it appears that I was wrong and even with the pinning removed it refuses to install (same problem as you previously posted). It appears that the newer ZoneMinder package depends on packages not available in the Debian 10/Buster (and they don't appear to be provided by ZoneMinder repo either). This completely surprises me as the repo is explicitly for Debian Buster?!

So I'm going to need to consult with the ZoneMinder community on what to do to get it working. Please feel free to ask them over on their forums. If you do, please cross post a link here and I can jusmp on your thread. Otherwise, I'll start a thread over there and post alink back here.

One possible workaround would be to do a full OS upgrade. I'm sure that would work as it installs on Debian 11/Bullseye fine from my testing (the new v17.2 updated appliance should be released in the next few days). TurnKey v16.x was based on Debian 10/Buster, but the current version of Debian is 11/Bullseye. So if you updated to the newer Debian base, then that should fix it. Having said that, the devil is always in the details. ANd perhaps you're better off waiting until we push the next release, then use TKLBAM to migrate your existing data to a new fresh install?

Regardless, we'll speak more soon.

JimmyStewart's picture

I'll wait it out on you since it will be a good test before you release for the others to upgrade.

If you find in the end that I will have to wipe clean and upgrade OS to get there then I will.

Thanks for your assistance here. 

Jeremy Davis's picture

I've done some more research and it appears to be a bug to me. If you're at all interested in the details, please feel free to have a read of the bug report I just lodged.

So the options moving forward are:

  • Wait until the bug is fixed. Timeframe: unknown, perhaps never (Debian 10/Buster is currently "oldstable" and I doubt ZoneMinder devs will continue support for it for very much longer anyway).
  • Wait until we release the v17.2 appliance and migrate your data to that (TKLBAM should just work - and if it doesn't I'd be happy to assist - manually copying the DB and your files would work too). Timeframe: hopefully a few days to a week.
  • Do a Debian style "in place" upgrade to a Debian 11/Bullseye base OS. Timeframe: anytime.

Out of interest, are you running this on bare metal or as a VM?

JimmyStewart's picture

Sorry for late reply, I have this as a bare metal system that was purchased for a stand alone ZoneMinder DVR.  I did the original TurnKey install from a USB and it installed everything including OS.  Again I am a novice when it comes to any operating system outside of the DOS and Windows.

You are probably correct that I should look at Debian 11/Bullseye but have to admit (embarrassingly) I am not sure how to do the "in place" upgrade.

 

Thanks again for all your assistance

Jeremy Davis's picture

There's no need to be embarrassed about your lack of knowledge Jimmy. I didn't know any of this until I learned it either! :) So thanks for allowing me the opportunity to enlighten you (and other passers by that might be reading this). You can help us too by giving feedback and asking questions about anything that you don't understand or doesn't make sense.. One of the biggest issues we have when writing docs and sharing info is curse of knowledge.

Also, not sure if you saw my other post? You should be able to upgrade ZoneMinder to v1.36.x, just not to the latest version.

Anyway, to get you started on, have a read of these doc pages:

If you wanted to try the TKLBAM data migration method, I would recommend testing on a local VM first. I.e. install the newer TurnKey version to a VM (install from ISO). Then restore your backup and see how it goes.

Having said that, the data migration method is likely more suited to when you're running TurnKey in a VM. With a bare metal install such as yours, I suspect that a Debian "in place" upgrade would be a better way to go.

Before you start

SSH

Personally, I think the best way to work with a server is via SSH. Obviously it's extremely useful to have direct access to it's terminal - e.g. for install and for network and early boot troubleshooting. Otherwise IMO working via SSH from a desktop system is preferable. It makes documenting your steps easier (e.g. dry run in a VM) and also makes following instructions online easier (both use cases: copy/paste FTW!). It's also really useful for finding info when you hit errors (again copy/paste - this time into google).

I'm a Linux user so OpenSSH client (i.e. 'ssh' CLI tool) comes by default. It ships with Mac OSX too. I note that Windows 11 also ships with OpenSSH client preinstalled by default. It's also pretty easy to install yourself in Windows 10. On Windows though you also have other choices, such as PuTTY or WinSCP. Personally I prefer the terminal ssh client, but YMMV.

Dry run in a VM

If you plan to do an "in place" upgrade, especially as the first time you attempt this, I strongly recommend doing a dry run in a VM first. I.e. install v16.1 ZoneMinder into a VM and then step through the upgrade. Because it will be a fresh TurnKey install and it won't have your data it's not an exact analog - but should allow you to get an understanding of the process and work through any issues that you might hit. I highly recommend documenting this as you go. You can then just re-run the steps later when you do it for real.

Backups and Snapshot

Backups are important. The reality is that data loss is a matter of when, not if. So if you care about your data, you are, at the very least manually taking backups of anything important. Automated backups are really the only way to be sure. And backups also need to be tested. It is said that just like untested code is always buggy, untested backups are unreliable. Sorry, I'm ranting a bit. My point was that you should already have backups and if you don't, now is the time to sort that out!

Snapshots are considered backups by some and I don't think it's a completely unreasonable argument. Although personally, I like having a backup, where the data is separated from the underlying OS - generally not possible in a snapshot. However, when doing something as potentially destructive as a major OS upgrade I think a snapshot is a quicker way to get back to exactly where you were before you started.

Snapshots are usually super easy when using a VM (it should be a feature of the VM software). On a bare metal install it's not quite so easy. Although still possible. I suggest taking a clone of your system using a tool such as Clonezilla.

The "in place" upgrade

The Debian 11/Bullseye Release Notes is the Debian upgrade "bible". Having said that, unless you're really interested, I wouldn't bother reading all of it. In fact I wouldn't even recommend reading much of it unless you want to understand the process much more. It goes into extreme detail and covers desktop systems that are completely irrelevant as a TurnKey user. The chapter that is likely most useful is Chapter 4. Upgrades from Debian 10 (buster). Like the rest of the release notes, it goes into lots of detail and some steps will be redundant or irrelevant, but should be relatively solid advice.

My advice is to skim through Chapter 4 from the release notes (as linked above) and then google for "debian cli upgrade buster bullseye". There should be plenty of more straight forward tutorials on how to actually do the upgrade via CLI (without the minutia).

Last words and a hint

Upgrading TurnKey v16.x (based on Debian 10/Buster) to a Debian 11/Bullseye base should go pretty smoothly. When I upgraded my desktop (I run Debian as my main PC) I spent nearly twice as long reading release notes than it actually took to do the upgrade. But as a novice it's possible you may hit issues. If you follow my advice and do a dry run in a VM first and ask if you hit any issues, or have any questions, then before you even start for real, you should have a pretty good grounding in what to expect. Then if you ensure you have both backups and a snapshot, then I don't think you can go too far wrong. Worst case, restore right back to where you are now.

One point I'm sure you'll hit - when you upgrade the TurnKey sources.list entries from 'buster' to 'bullseye', you'll get a key error when you run 'apt update'. To fix that (or to preempt it now you know to expect it), you'll need to download the keys from GitHub:

_url="https://raw.githubusercontent.com/turnkeylinux/common/master/overlays/bootstrap_apt"
for _repo in main security testing; do
    _key="usr/share/keyrings/tkl-bullseye-$_repo"
    curl "$_url/${_key}.asc" | gpg --dearmor > "/${_key}.gpg"
done

Good luck and please don't hesitate to post back at any point with any questions. Please keep us posted on how you go with it all regardless, but especially if you have success! :)

JimmyStewart's picture

Thank you Jeremy for such detail and time spent to answer my question.  I will surly learn from you.

Jeremy Davis's picture

Hi again Jimmy, I have something for you. It's not a complete resolution to the issue of upgrading to the latest ZoneMinder release, but it will let you upgrade to v1.36.x (specifically the previous version: 1.36.32). It's not quite were we want to go, but it's pretty close! :)

Try this:

apt install zoneminder=1.36.32-buster1

It worked for me, hopefully it works for you too!?

Also the ZoneMinder dev is looking into the issue with v1.36.33 (which as I said, appears to be a bug). So hopefully you'll be able to install that soon.

Jeremy Davis's picture

The ZoneMinder devs have rebuilt the Debian Buster package and the latest should install cleanly now. That's irrelevant if you have upgraded to a Debian 11/Bullseye base.

Either way, you should be able to update to the latest release of Zoneminder now like this:

apt update
apt install -y zoneminder
JimmyStewart's picture

@Jeremy Davis

Still having problems updating to latest version of Zoneminder.  I did a total wipe of the drive and installed 17.1 from scratch.  This brought me to:

Welcome to Zoneminder, TurnKey GNU/Linux 17.1 (Debian 11/Bullseye)

After install I did an update and upgrade on system.  Then I ran zoneminder and see that the version is 1.34.23 and it thinks it is the latest.  I thought it was fixed in 17.2 but I can not find an ISO for that and everything says it should upgrade now to v1.36.33 and it should revert to installing from upstream zmrepo apt repository.

It does not work for me.  see below it says "zoneminder is already the newest version (1.34.23-1)"

root@zoneminder ~# apt update
Hit:1 http://security.debian.org bullseye-security InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease
Ign:3 http://archive.turnkeylinux.org/debian bullseye-security InRelease
Ign:4 http://archive.turnkeylinux.org/debian bullseye InRelease
Hit:5 http://archive.turnkeylinux.org/debian bullseye-security Release
Hit:6 http://archive.turnkeylinux.org/debian bullseye Release
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
root@zoneminder ~# apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@zoneminder ~# apt install -y zoneminder
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
zoneminder is already the newest version (1.34.23-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Any ideas?

 

Jeremy Davis's picture

Hi Jimmy, my deepest apologies! It looks like I missed a step when I updated the website. Whilst the updated v17.2 ISO is on the mirror, I hadn't updated the ZoneMinder page on the website to link to it! Doh!

I have just fixed it and you should now be able to download the latest v17.2 ISO if you want to go that way.

Alternatively, I could step you through updating your current version. Let me know if that's what you want/need.

JimmyStewart's picture

Thanks Jeremy, That fixed it.  Really appreciate your awesome support.

Add new comment