pducharme / UniFi-Video-Controller

Docker for Unifi-Video Controller (Ubiquiti Networks)
199 stars 105 forks source link

cannot build image due to mongodb package error #195

Closed ebaschiera closed 3 years ago

ebaschiera commented 3 years ago

Hi, I am triyng to rebuild the image from scratch because I wanted to upgrade to the latest version and I had the permission issue on /var/cache/unifi-video. But the rebuilding process fails at this line. It looks like the mongodb-org-server package fails to install:

dpkg: error processing package mongodb-org-server (--configure):
 installed mongodb-org-server package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
 mongodb-org-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Anyone know a workaround to that?

Thanks!

ebaschiera commented 3 years ago

Some more info:

Adding system user `mongodb' (UID 102) ...
Adding new user `mongodb' (UID 102) with group `nogroup' ...
Not creating home directory `/home/mongodb'.
Adding group `mongodb' (GID 103) ...
Done.
Adding user `mongodb' to group `mongodb' ...
Adding user mongodb to group mongodb
Done.
/var/lib/dpkg/info/mongodb-org-server.postinst: 43: /var/lib/dpkg/info/mongodb-org-server.postinst: systemctl: not found
dpkg: error processing package mongodb-org-server (--configure):
 installed mongodb-org-server package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
 mongodb-org-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
ebaschiera commented 3 years ago

I found this as a workaround, but it looks like run.sh expects mongod to be running. So applying that workaround doesn't ensure that mongod is running. I'm still stuck.

ebaschiera commented 3 years ago

I found this as a workaround, but it looks like run.sh expects mongod to be running. So applying that workaround doesn't ensure that mongod is running. I'm still stuck.

It turns out mongod was running fine. So that workaround is good and I am proposing it with a PR.