Problems upgrading 1.30.4 to 1.32.3 on Debian Stretch (apt sticks to old version)

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
bbqkees
Posts: 3
Joined: Thu Aug 08, 2019 9:04 am

Problems upgrading 1.30.4 to 1.32.3 on Debian Stretch (apt sticks to old version)

Post by bbqkees »

I have been successfully running 1.30.4 on Debian Stretch 9.9 with multiple HD cameras for like ages.

Now I'm trying to upgrade to 1.32.3.

The initial install was from the repo deb-multimedia.org with the guide:
https://wiki.zoneminder.com/Debian_9_64 ... e_Easy_Way

To upgrade, I followed https://zoneminder.readthedocs.io/en/la ... an-stretch
So added the new package repository at zmrepo.zoneminder.com, removed the old one from the sources list, installed the HTTPS module, downloaded the GPG key etc.
Did sudo apt-get update/upgrade/dist-upgrade.
Runs fine without errors but Zoneminder keeps sticking to 1.30.4, saying it is already the newest version.

Followed some other guides and a lot of Googling around but I'm a bit stuck now.
As the initial setup at the time was far from quick, I would like to prevent a complete uninstall and still do an upgrade.

Likely it has to do with changing repositories.
Perhaps the solution is easy, but I'm not seeing it.

Any leads?
bbqkees
Posts: 3
Joined: Thu Aug 08, 2019 9:04 am

Re: Problems upgrading 1.30.4 to 1.32.3 on Debian Stretch (apt sticks to old version)

Post by bbqkees »

Solved it.

Code: Select all

zm@Server:~$ sudo apt-get install zoneminder
[sudo] password for zm:
Reading package lists... Done
Building dependency tree
Reading state information... Done
zoneminder is already the newest version (2:1.30.4-dmo1+deb9u2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
So it thinks it is the latest version.

Code: Select all

zm@Server:~$ apt-cache policy zoneminder
zoneminder:
  Installed: 2:1.30.4-dmo1+deb9u2
  Candidate: 2:1.30.4-dmo1+deb9u2
  Version table:
 *** 2:1.30.4-dmo1+deb9u2 100
        100 /var/lib/dpkg/status
     1.32.3-stretch 500
        500 https://zmrepo.zoneminder.com/debian/release stretch/ Packages
     1.32.2-stretch 500
        500 https://zmrepo.zoneminder.com/debian/release stretch/ Packages
     1.32.0-stretch 500
        500 https://zmrepo.zoneminder.com/debian/release stretch/ Packages

Ok so there actually is a new version available, just have to choose it specifically:

Code: Select all

zm@Server:~$ sudo apt-get install zoneminder=1.32.3-stretch
.....
The following packages will be DOWNGRADED:
  zoneminder
0 upgraded, 37 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
And now it works for the most part.
cenzo188
Posts: 6
Joined: Wed Aug 17, 2016 5:05 pm

Re: Problems upgrading 1.30.4 to 1.32.3 on Debian Stretch (apt sticks to old version)

Post by cenzo188 »

Hello, I'm trying to do the same as you and I'm stuck at the same point for similar reasons.
I'm also following the guide at: https://zoneminder.readthedocs.io/en/la ... an-stretch
I added the repo, installed apt-transport-https, added the key.
When I apt update, I can see it Hit the ZM repo and the update completes without error.
But when I try apt-cache policy zoneminder, I only see version 2:1.30.4-dmo1+deb9u2.
The file /var/lib/apt/lists/zmrepo.zoneminder.com_debian_release_stretch_Packages exists and I can see the newer versions in that file.
Is there anything else you had to do to get apt to recognize the versions from the ZM repo? I'm not sure what I could have missed here.
CountyLine
Posts: 63
Joined: Thu Aug 29, 2019 5:22 pm
Location: USA

Re: Problems upgrading 1.30.4 to 1.32.3 on Debian Stretch (apt sticks to old version)

Post by CountyLine »

2:1.30.4-dmo1+deb9u2 is from Debian Multimedia (deb-multimedia). It violates the naming conventions by having an epoch value of 2 which overrides the other zoneminder packages

Make sure you don't have deb-multimedia anywhere in sources.list, then clear your package cache and reload.

Code: Select all

$ sudo apt-get clean
clears the cache.
cenzo188
Posts: 6
Joined: Wed Aug 17, 2016 5:05 pm

Re: Problems upgrading 1.30.4 to 1.32.3 on Debian Stretch (apt sticks to old version)

Post by cenzo188 »

The deb-multimedia problem isn't mentioned in the install guide. Maybe it should be?
Maybe not, because removing deb-multimedia from sources.list (and doing clean/update afterward, of course) didn't work.

Here's the output of apt policy before:

Code: Select all

zoneminder:                                                                        
  Installed: 2:1.30.4-dmo1+deb9u2                                                  
  Candidate: 2:1.30.4-dmo1+deb9u2                                                  
  Version table:                                                                   
 *** 2:1.30.4-dmo1+deb9u2 500                                                      
        500 http://www.deb-multimedia.org stretch/main i386 Packages               
        100 /var/lib/dpkg/status 
And after:

Code: Select all

zoneminder:
  Installed: 2:1.30.4-dmo1+deb9u2
  Candidate: 2:1.30.4-dmo1+deb9u2
  Version table:
 *** 2:1.30.4-dmo1+deb9u2 100
        100 /var/lib/dpkg/status
and the relevant line from my sources.list, the same as it is in the guide, but just to be sure:

Code: Select all

deb https://zmrepo.zoneminder.com/debian/release stretch/
output of apt update:

Code: Select all

Ign:1 http://ftp.us.debian.org/debian stretch InRelease
Hit:2 http://security.debian.org/debian-security stretch/updates InRelease
Hit:3 http://ftp.us.debian.org/debian stretch-updates InRelease
Hit:4 http://ftp.us.debian.org/debian stretch Release
Ign:5 https://zmrepo.zoneminder.com/debian/release stretch/ InRelease
Hit:6 https://zmrepo.zoneminder.com/debian/release stretch/ Release
I feel I've missed something obvious but I don't know what it could be.
CountyLine
Posts: 63
Joined: Thu Aug 29, 2019 5:22 pm
Location: USA

Re: Problems upgrading 1.30.4 to 1.32.3 on Debian Stretch (apt sticks to old version)

Post by CountyLine »

2:1.30.4-dmo1+deb9u2 appears to be actually installed. I did not realize that was the case. If so, try purging it, then cleaning the cache and reloading again.

Code: Select all

apt-get purge zoneminder
Also, take a look in all the directories under /etc/apt/ and make sure deb-multimedia is not in there anywhere.
cenzo188
Posts: 6
Joined: Wed Aug 17, 2016 5:05 pm

Re: Problems upgrading 1.30.4 to 1.32.3 on Debian Stretch (apt sticks to old version)

Post by cenzo188 »

No, that didn't work at all. Now I get nothing but "Unable to locate package zoneminder".
I'm not sure why it can't find the package, since update succeeds and I can clearly see the zoneminder packages listed in /var/lib/apt/lists/.
I even tried removing all files under /var/lib/apt/lists and updating again. Still unable to locate the package.
I guess I'll have to do some homework and learn more about how debian's APT really works before I can solve this. something is clearly very wrong with my system. unfortunately a fresh debian install isn't an option.
cenzo188
Posts: 6
Joined: Wed Aug 17, 2016 5:05 pm

Re: Problems upgrading 1.30.4 to 1.32.3 on Debian Stretch (apt sticks to old version)

Post by cenzo188 »

crap there is something seriously wrong with my system... it's an i386 system and the zoneminder 1.32 packages are amd64 only!
Well, this whole thing was dumb. Sorry to take your time.
no mp4 events for me :(
CountyLine
Posts: 63
Joined: Thu Aug 29, 2019 5:22 pm
Location: USA

Re: Problems upgrading 1.30.4 to 1.32.3 on Debian Stretch (apt sticks to old version)

Post by CountyLine »

Well, at least we know. Condolences.
Post Reply