The following packages have unmet dependencies

ncp
letsencrypt
linux_question
nc15

#1

Hi, when I run the wizard for external access, Letsencrypt bug:

E: Unable to correct problems, you have held broken packages.

[ no-ip ]

Auto configuration for Linux client of no-ip.com.

Only one host [lorantoutan.ddns.net] is registered to this account.
It will be used.

New configuration file ‘/usr/local/etc/no-ip2.conf’ created.

System config value trusted_domains => 3 set to string *********
System config value overwrite.cli.url set to string **********
noip DDNS enabled

[ nc-autoupdate-ncp ]
automatic NextCloudPi updates enabled

[ dnsmasq ]
System config value trusted_domains => 2 set to string lorantoutan.ddns.net
System config value overwrite.cli.url set to string https://lorantoutan.ddns.net/
dnsmasq enabled

[ letsencrypt ]
Bootstrapping dependencies for Debian-based OSes… (you can skip this with --no-bootstrap)
Hit:1 …deb.debian.org/debian buster InRelease
Hit:2 …raspbian.raspberrypi.org/raspbian stretch InRelease
Hit:3 …archive.raspberrypi.org/debian stretch InRelease
Reading package lists…

Reading package lists…
Building dependency tree…

Reading state information…
ca-certificates is already the newest version (20161130+nmu1+deb9u1).
openssl is already the newest version (1.1.0j-1~deb9u1).
openssl set to manually installed.
python is already the newest version (2.7.13-2).
gcc is already the newest version (4:8.2.0-2).
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:
** python-dev : Depends: libpython-dev (= 2.7.13-2) but it is not going to be installed**
** Depends: python2.7-dev (>= 2.7.13-1~) but it is not going to be installed**
E: Unable to correct problems, you have held broken packages.
Thansk for your response.


#2

You need to fix that dependency problem. Please share the info of your system sudo ncp-report


#3

With the new image file : NextCloudPi_RPi_Berryboot_01-13-19.img
The problem is resolved
Thanks for your response.
Hi


#4

I have this problem too. using the nextcloud pi image for raspberry pi


#5

feel like at some point the installer removed certbot and installed letsencrypt and the dependency issues started.


#6

I delete the image and I download the last image (january 2019) and I install him without errors


#7

After a little more investigation on the dependencies it looks like the version of some of the python dependencies are a little newer than the package manager is calling for. I will send ncp-report when I figure out how to copy it out of nano. My cert is going to expire so I’m hoping to get this figured out.


#8

<–! Paste this in GitHub report -->

NextCloudPi diagnostics

NextCloudPi version  v1.6.1
NextCloudPi image    NextCloudPi_10-05-18
distribution         Raspbian GNU/Linux 9 \n \l
automount            no
USB devices          none
datadir              /var/www/nextcloud/data
data in SD           yes
data filesystem      ext2/ext3
data disk usage      5.5G/30G
rootfs usage         5.5G/30G
swapfile             /var/swap
dbdir                /var/lib/mysql
Nextcloud check      ok
Nextcloud version    15.0.4.0
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
Postfix service      up
internet check       ok
port check 80        open
port check 443       open
IP                   ***REMOVED SENSITIVE VALUE***
gateway              ***REMOVED SENSITIVE VALUE***
interface            eth0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
uptime               2days

Nextcloud configuration

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "localhost",
            "5": "nextcloudpi.local",
            "7": "nextcloudpi",
            "8": "nextcloudpi.lan",
            "1": "zzzzzzzzzzz",
            "4": "zzzzzzzzzzzzzzzz",
            "3": "zzzzzzzzzzzzzzzzzzzzzzzz",
            "11": "zzzzzzzzzzzzzzzzzzzzzzzzzz"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "15.0.4.0",
        "overwrite.cli.url": "https:\/\/zzzzzzzzzzzzzzzzzz.com\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "mail_smtpmode": "sendmail",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "loglevel": "2",
        "log_type": "file",
        "maintenance": false
    }
}

HTTPd logs

[Wed Feb 13 06:25:03.371370 2019] [ssl:warn] [pid 859:tid 1995592064] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Wed Feb 13 06:25:04.001153 2019] [mpm_event:notice] [pid 859:tid 1995592064] AH00489: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2q configured -- resuming normal operations
[Wed Feb 13 06:25:04.001306 2019] [core:notice] [pid 859:tid 1995592064] AH00094: Command line: '/usr/sbin/apache2'

Database logs


Nextcloud logs

{"reqId":"AW795tvCorYdrtGkiYxs","level":1,"time":"2019-02-11T00:06:50+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Move .step file of updater to backup location","userAgent":"--","version":"15.0.2.0"}
{"reqId":"AW795tvCorYdrtGkiYxs","level":1,"time":"2019-02-11T00:06:50+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Fix potential broken mount points","userAgent":"--","version":"15.0.2.0"}
{"reqId":"AW795tvCorYdrtGkiYxs","level":1,"time":"2019-02-11T00:06:50+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::info: Repair info: No mounts updated","userAgent":"--","version":"15.0.2.0"}
{"reqId":"AW795tvCorYdrtGkiYxs","level":1,"time":"2019-02-11T00:06:50+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Repair invalid paths in file cache","userAgent":"--","version":"15.0.2.0"}
{"reqId":"AW795tvCorYdrtGkiYxs","level":1,"time":"2019-02-11T00:06:50+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Add log rotate job","userAgent":"--","version":"15.0.2.0"}
{"reqId":"AW795tvCorYdrtGkiYxs","level":1,"time":"2019-02-11T00:06:50+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Clear frontend caches","userAgent":"--","version":"15.0.2.0"}
{"reqId":"AW795tvCorYdrtGkiYxs","level":1,"time":"2019-02-11T00:06:50+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::info: Repair info: Image cache cleared","userAgent":"--","version":"15.0.2.0"}
{"reqId":"AW795tvCorYdrtGkiYxs","level":1,"time":"2019-02-11T00:06:56+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::info: Repair info: SCSS cache cleared","userAgent":"--","version":"15.0.2.0"}
{"reqId":"AW795tvCorYdrtGkiYxs","level":1,"time":"2019-02-11T00:06:58+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::info: Repair info: JS cache cleared","userAgent":"--","version":"15.0.2.0"}
{"reqId":"AW795tvCorYdrtGkiYxs","level":1,"time":"2019-02-11T00:06:58+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Clear every generated avatar on major updates","userAgent":"--","version":"15.0.2.0"}
{"reqId":"AW795tvCorYdrtGkiYxs","level":1,"time":"2019-02-11T00:06:58+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Add preview background cleanup job","userAgent":"--","version":"15.0.2.0"}
{"reqId":"AW795tvCorYdrtGkiYxs","level":1,"time":"2019-02-11T00:06:58+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Queue a one-time job to cleanup old backups of the updater","userAgent":"--","version":"15.0.2.0"}
{"reqId":"AW795tvCorYdrtGkiYxs","level":1,"time":"2019-02-11T00:06:58+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Repair pending cron jobs","userAgent":"--","version":"15.0.2.0"}
{"reqId":"AW795tvCorYdrtGkiYxs","level":1,"time":"2019-02-11T00:06:58+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::info: Repair info: No need to repair pending cron jobs.","userAgent":"--","version":"15.0.2.0"}
{"reqId":"AW795tvCorYdrtGkiYxs","level":1,"time":"2019-02-11T00:06:58+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Extract the vcard uid and store it in the db","userAgent":"--","version":"15.0.2.0"}
{"reqId":"AW795tvCorYdrtGkiYxs","level":1,"time":"2019-02-11T00:06:58+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::startCheckCodeIntegrity: Starting code integrity check...","userAgent":"--","version":"15.0.2.0"}
{"reqId":"AW795tvCorYdrtGkiYxs","level":1,"time":"2019-02-11T00:07:46+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::finishedCheckCodeIntegrity: Finished code integrity check","userAgent":"--","version":"15.0.2.0"}
{"reqId":"AW795tvCorYdrtGkiYxs","level":1,"time":"2019-02-11T00:07:46+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::updateEnd: Update successful","userAgent":"--","version":"15.0.4.0"}
{"reqId":"AW795tvCorYdrtGkiYxs","level":1,"time":"2019-02-11T00:07:46+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::maintenanceDisabled: Turned off maintenance mode","userAgent":"--","version":"15.0.4.0"}
{"reqId":"AW795tvCorYdrtGkiYxs","level":1,"time":"2019-02-11T00:07:46+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"--","version":"15.0.4.0"}


#9

yeah you are going to have to solve the dependency situation. Maybe ask in the certbot forums, or try apt-get upgrade first or similar.


#10

Thx I thought about apt upgrade but it didn’t look like that was going to update any of the packages that are causing the issue. I will try that and also hit up the forums. If I figure it out I will post solution here for others who might have the issue.


#11

I run NCP on an OdroidHC2 for quite some time now with no issues at all. Since one of the latest NCP updates (auto-update confgured), I have the same issue and letsencrypt cannot renew the certificate

[...]
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:
python-dev : Depends: libpython-dev (= 2.7.13-2) but it is not going to be installed
Depends: python2.7-dev (&gt;= 2.7.13-1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Unfortuantely I don’t know how to resolve this. “apt-get upgrade” didn’t do the job. If anyone can help me I would be very grateful!


#12

You could try:

apt-get -f install


#13

i already did without success.
Also with apt-get upgrade & apt-get update no success… :frowning:


#14

Do you have backups?
If so, could just do a fresh install and upgrade, then restore config and data.
Had something similar on a rpi3B+ and thats what I ended up doing.


#15

surely this would be an option and might be worthwhile… I had hoped I could avoid this.
No other ideas?
Just came accross someone stating re-installing with aptitude instead of apt-get might solve, as this was “more intelligent”… unfortunately I would not be sure which packages to re-install with the error messages given…

Edit: There is another entry I had missed mentioning:
python set to manually installed.
Maybe this is the reason? Can I correct that soomehow (without freshly installing the entire thing)?


#16

I have just tried with re-insalling python and libpython-dev with aptitude and this solved the issues, as it allowed to explicitely downgrade to 2.7.13-2 while 2.7.15 was already installed partly… now all is on same version and works fine.
Thanks


#17

Thanks I will try this


#18

aptitude to the rescue! that’s right didn’t think about that but it’s not the first time it is better than apt at fixing this kind of stuff

thanks for sharing


#19

confirming that this worked for me also. Thanks tjohs and thanks nachoparker.


#20

Thanks for sharing! :sunglasses:
I had no idea aptitude could fix this.