Error migrating to stretch: held packages

Hi there,

When trying to migrate to stretch, I got the following message:

The following packages have unmet dependencies:
systemd : Breaks: rdnssd (< 1.0.1-5) but 1.0.1-1+deb8u1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
Error: Migration 3 migrate_to_stretch has failed with exception Something wrong happened during the main upgrade : system is still on Jessie !? To investigate the issue, please look at /tmp/migrate_to_stretch.log :s …, aborting

Here are the full details:

root@myserver:/home/myuser# yunohost --version
yunohost: 
  repo: local
  version: 2.7.14
yunohost-admin: 
  repo: local
  version: 2.7.14
moulinette: 
  repo: local
  version: 2.7.14
ssowat: 
  repo: local
  version: 2.7.14
root@myserver:/home/myuser# 
root@myserver:/home/myuser# 
root@myserver:/home/myuser# 
root@myserver:/home/myuser# 
root@myserver:/home/myuser# 
root@myserver:/home/myuser# yunohost tools migrations migrate --accept-disclaimer
Warning: Running migration 3 migrate_to_stretch...
Warning: Starting migration to Stretch. The logs will be available in /tmp/migrate_to_stretch.log.
Warning: Patching the sources.lists ...
Hit http://forge.yunohost.org stretch InRelease
Hit http://forge.yunohost.org stretch/stable amd64 Packages
Get:1 http://security.debian.org stretch/updates InRelease [94.3 kB]
Ign http://forge.yunohost.org stretch/stable Translation-en
Hit http://security.debian.org stretch/updates/main Sources
Hit http://security.debian.org stretch/updates/main amd64 Packages
Hit http://security.debian.org stretch/updates/main Translation-en
Ign http://ftp.es.debian.org stretch InRelease
Get:2 http://ftp.es.debian.org stretch-updates InRelease [91.0 kB]
Hit http://ftp.es.debian.org stretch Release.gpg
Get:3 http://ftp.es.debian.org stretch-updates/main Sources/DiffIndex [4180 B]
Get:4 http://ftp.es.debian.org stretch-updates/main amd64 Packages/DiffIndex [4180 B]
Get:5 http://ftp.es.debian.org stretch-updates/main Translation-en/DiffIndex [2704 B]
Hit http://ftp.es.debian.org stretch Release
Hit http://ftp.es.debian.org stretch/main Sources
Hit http://ftp.es.debian.org stretch/main amd64 Packages
Hit http://ftp.es.debian.org stretch/main Translation-en
Fetched 196 kB in 3s (54.9 kB/s)
Reading package lists...
metronome was already not hold.
yunohost was already set on hold.
yunohost-admin was already set on hold.
moulinette was already set on hold.
ssowat was already set on hold.
fail2ban was already set on hold.
Warning: Starting main upgrade ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = "en_US:en",
	LC_ALL = (unset),
	LC_TIME = "es_ES.UTF-8",
	LC_MONETARY = "es_ES.UTF-8",
	LC_ADDRESS = "es_ES.UTF-8",
	LC_TELEPHONE = "es_ES.UTF-8",
	LC_NAME = "es_ES.UTF-8",
	LC_MEASUREMENT = "es_ES.UTF-8",
	LC_IDENTIFICATION = "es_ES.UTF-8",
	LC_NUMERIC = "es_ES.UTF-8",
	LC_PAPER = "es_ES.UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = "en_US:en",
	LC_ALL = (unset),
	LC_TIME = "es_ES.UTF-8",
	LC_MONETARY = "es_ES.UTF-8",
	LC_ADDRESS = "es_ES.UTF-8",
	LC_TELEPHONE = "es_ES.UTF-8",
	LC_NAME = "es_ES.UTF-8",
	LC_MEASUREMENT = "es_ES.UTF-8",
	LC_IDENTIFICATION = "es_ES.UTF-8",
	LC_NUMERIC = "es_ES.UTF-8",
	LC_PAPER = "es_ES.UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory
error: Cannot find a question for postgresql-common/obsolete-major
Reading package lists...
Building dependency tree...
Reading state information...
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:
 systemd : Breaks: rdnssd (< 1.0.1-5) but 1.0.1-1+deb8u1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
Error: Migration 3 migrate_to_stretch has failed with exception Something wrong happened during the main upgrade : system is still on Jessie !? To investigate the issue, please look at /tmp/migrate_to_stretch.log :s ..., aborting
root@myserver:/home/myuser# 
root@myserver:/home/myuser# 
root@myserver:/home/myuser# 
root@myserver:/home/myuser# 
root@myserver:/home/myuser# 
root@myserver:/home/myuser# 
root@myserver:/home/myuser# cat /tmp/migrate_to_stretch.log
Hit http://repo.yunohost.org jessie InRelease
Ign http://ftp.es.debian.org jessie InRelease
Hit http://ftp.es.debian.org jessie-updates InRelease
Hit http://security.debian.org jessie/updates InRelease
Hit http://repo.yunohost.org jessie/stable amd64 Packages
Hit http://ftp.es.debian.org jessie Release.gpg
Hit http://security.debian.org jessie/updates/main Sources
Hit http://ftp.es.debian.org jessie-updates/main Sources
Hit http://security.debian.org jessie/updates/main amd64 Packages
Get:1 http://ftp.es.debian.org jessie-updates/main amd64 Packages/DiffIndex [11.8 kB]
Hit http://security.debian.org jessie/updates/main Translation-en
Ign http://repo.yunohost.org jessie/stable Translation-en
Get:2 http://ftp.es.debian.org jessie-updates/main Translation-en/DiffIndex [3688 B]
Hit http://ftp.es.debian.org jessie Release
Hit http://ftp.es.debian.org jessie/main Sources
Hit http://ftp.es.debian.org jessie/main amd64 Packages
Hit http://ftp.es.debian.org jessie/main Translation-en
Fetched 15.5 kB in 2s (7032 B/s)
Reading package lists...
Get:1 http://security.debian.org stretch/updates InRelease [94.3 kB]
Ign http://ftp.es.debian.org stretch InRelease
Get:2 http://ftp.es.debian.org stretch-updates InRelease [91.0 kB]
Get:3 http://forge.yunohost.org stretch InRelease [18.2 kB]
Get:4 http://forge.yunohost.org stretch/stable amd64 Packages [4270 B]
Get:5 http://security.debian.org stretch/updates/main Sources [144 kB]
Get:6 http://ftp.es.debian.org stretch Release.gpg [2434 B]
Get:7 http://security.debian.org stretch/updates/main amd64 Packages [360 kB]
Ign http://forge.yunohost.org stretch/stable Translation-en
Get:8 http://ftp.es.debian.org stretch-updates/main Translation-en [6782 B]
Get:9 http://security.debian.org stretch/updates/main Translation-en [169 kB]
Get:10 http://ftp.es.debian.org stretch Release [118 kB]
Get:11 http://ftp.es.debian.org stretch-updates/main Sources [5384 B]
Get:12 http://ftp.es.debian.org stretch-updates/main amd64 Packages [11.0 kB]
Get:13 http://ftp.es.debian.org stretch/main Sources [6756 kB]
Get:14 http://ftp.es.debian.org stretch/main amd64 Packages [7122 kB]
Get:15 http://ftp.es.debian.org stretch/main Translation-en [5394 kB]
Fetched 20.3 MB in 15s (1270 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
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:
 systemd : Breaks: rdnssd (< 1.0.1-5) but 1.0.1-1+deb8u1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
Ign http://ftp.es.debian.org stretch InRelease
Hit http://ftp.es.debian.org stretch-updates InRelease
Hit http://security.debian.org stretch/updates InRelease
Hit http://forge.yunohost.org stretch InRelease
Hit http://ftp.es.debian.org stretch Release.gpg
Hit http://forge.yunohost.org stretch/stable amd64 Packages
Hit http://security.debian.org stretch/updates/main Sources
Get:1 http://ftp.es.debian.org stretch-updates/main Sources/DiffIndex [4180 B]
Get:2 http://ftp.es.debian.org stretch-updates/main amd64 Packages/DiffIndex [4180 B]
Hit http://security.debian.org stretch/updates/main amd64 Packages
Get:3 http://ftp.es.debian.org stretch-updates/main Translation-en/DiffIndex [2704 B]
Hit http://security.debian.org stretch/updates/main Translation-en
Hit http://ftp.es.debian.org stretch Release
Ign http://forge.yunohost.org stretch/stable Translation-en
Hit http://ftp.es.debian.org stretch/main Sources
Hit http://ftp.es.debian.org stretch/main amd64 Packages
Hit http://ftp.es.debian.org stretch/main Translation-en
Fetched 11.1 kB in 2s (4671 B/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
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:
 systemd : Breaks: rdnssd (< 1.0.1-5) but 1.0.1-1+deb8u1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
Hit http://forge.yunohost.org stretch InRelease
Ign http://ftp.es.debian.org stretch InRelease
Hit http://ftp.es.debian.org stretch-updates InRelease
Hit http://security.debian.org stretch/updates InRelease
Hit http://forge.yunohost.org stretch/stable amd64 Packages
Hit http://ftp.es.debian.org stretch Release.gpg
Hit http://security.debian.org stretch/updates/main Sources
Get:1 http://ftp.es.debian.org stretch-updates/main Sources/DiffIndex [4180 B]
Hit http://security.debian.org stretch/updates/main amd64 Packages
Get:2 http://ftp.es.debian.org stretch-updates/main amd64 Packages/DiffIndex [4180 B]
Hit http://security.debian.org stretch/updates/main Translation-en
Get:3 http://ftp.es.debian.org stretch-updates/main Translation-en/DiffIndex [2704 B]
Ign http://forge.yunohost.org stretch/stable Translation-en
Hit http://ftp.es.debian.org stretch Release
Hit http://ftp.es.debian.org stretch/main Sources
Hit http://ftp.es.debian.org stretch/main amd64 Packages
Hit http://ftp.es.debian.org stretch/main Translation-en
Fetched 11.1 kB in 2s (4431 B/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
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:
 systemd : Breaks: rdnssd (< 1.0.1-5) but 1.0.1-1+deb8u1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
Hit http://forge.yunohost.org stretch InRelease
Hit http://forge.yunohost.org stretch/stable amd64 Packages
Get:1 http://security.debian.org stretch/updates InRelease [94.3 kB]
Ign http://forge.yunohost.org stretch/stable Translation-en
Hit http://security.debian.org stretch/updates/main Sources
Hit http://security.debian.org stretch/updates/main amd64 Packages
Hit http://security.debian.org stretch/updates/main Translation-en
Ign http://ftp.es.debian.org stretch InRelease
Get:2 http://ftp.es.debian.org stretch-updates InRelease [91.0 kB]
Hit http://ftp.es.debian.org stretch Release.gpg
Get:3 http://ftp.es.debian.org stretch-updates/main Sources/DiffIndex [4180 B]
Get:4 http://ftp.es.debian.org stretch-updates/main amd64 Packages/DiffIndex [4180 B]
Get:5 http://ftp.es.debian.org stretch-updates/main Translation-en/DiffIndex [2704 B]
Hit http://ftp.es.debian.org stretch Release
Hit http://ftp.es.debian.org stretch/main Sources
Hit http://ftp.es.debian.org stretch/main amd64 Packages
Hit http://ftp.es.debian.org stretch/main Translation-en
Fetched 196 kB in 3s (54.9 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
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:
 systemd : Breaks: rdnssd (< 1.0.1-5) but 1.0.1-1+deb8u1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

Any suggestion to solve it?

Cheers!

Let me add more things:

root@myserver:/home/myuser#apt install rdnssd
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:
 gnome-shell-common : Breaks: gnome-tweak-tool (< 3.21.91) but 3.14.2-2 is to be installed
 gsettings-desktop-schemas : Breaks: mutter (< 3.19.92) but 3.14.4-1~deb8u1 is to be installed
 ssowat : Depends: nginx-extras (>= 1.6.2) but it is not going to be installed
 yunohost : Depends: git but it is not going to be installed
            Depends: mariadb-server but it is not going to be installed or
                     mysql-server but it is not going to be installed
            Depends: php5-mysql but it is not going to be installed or
                     php5-mysqlnd but it is not installable
            Depends: slapd but it is not going to be installed
            Depends: postfix-policyd-spf-perl but it is not going to be installed
            Depends: nginx-extras (>= 1.6.2) but it is not going to be installed
            Depends: php5-fpm but it is not going to be installed
            Depends: php5-ldap but it is not going to be installed
            Depends: php5-intl but it is not going to be installed
            Recommends: php5-gd but it is not going to be installed
            Recommends: php5-curl but it is not going to be installed
            Recommends: php-gettext but it is not going to be installed
            Recommends: php5-mcrypt but it is not going to be installed
            Recommends: libdbd-ldap-perl but it is not going to be installed
            Recommends: libnet-dns-perl but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

root@myserver:/home/myuser# 
root@myserver:/home/myuser# 
root@myserver:/home/myuser# 
root@myserver:/home/myuser# 
root@myserver:/home/myuser# aptitude install rdnssd
The following packages will be upgraded: 
  rdnssd{b} 
1 packages upgraded, 0 newly installed, 0 to remove and 1633 not upgraded.
Need to get 55.4 kB of archives. After unpacking 37.9 kB will be used.
The following packages have unmet dependencies:
 rdnssd : Conflicts: network-manager but 0.9.10.0-7 is installed and it is kept back.
The following actions will resolve these dependencies:

     Remove the following packages:                                    
1)     gnome                                                           
2)     network-manager                                                 
3)     network-manager-gnome                                           

     Leave the following dependencies unresolved:                      
4)     task-gnome-desktop recommends gnome                             
5)     task-gnome-desktop recommends network-manager-gnome             
6)     gnome-control-center recommends network-manager-gnome (>= 0.9.8)
7)     gnome-core recommends network-manager-gnome                     


Accept this solution? [Y/n/q/?] ^[^C

And I did not dare to accept the solution suggested by aptitude.

By the way, my server was originally installed as a normal Debian, and then I added yunohost.

Hmm I really don’t understand why apt want to install version 1.0.1+deb8u1 as ‘deb8’ refers to Jessie and you should be getting packages from stretch repo now …

Can you try to apt-get clean then apt-get update, then report the output of apt-cache policy rdnssd ?

Also I see that you have gnome install which seems to related somehow to the conflict. Are you using a graphical interface on the server ?

Hey Aleks! Thank you!

Did apt-get clean and apt-get update and then I got the following on apt-cache policy rdnssd:

rdnssd:
  Installed: 1.0.1-1+deb8u1
  Candidate: 1.0.3-3
  Version table:
     1.0.3-3 0
        500 http://ftp.es.debian.org/debian/ stretch/main amd64 Packages
 *** 1.0.1-1+deb8u1 0
        100 /var/lib/dpkg/status

Yes, I have access to the graphical interface on the server.
I had problems when trying for the first time to install the yunohost iso image on my server. The problems were solved by installing first Debian, and later adding yunohost. Maybe that is why I have gnome?
I can access the GUI on the server, but I do not use it. But sometimes I do need a screen and a keyboard for entering the full disk encryption password when booting, as my Debian installation is fully encrypted.

sudo apt-get -f install

Thanks.

Do you mean the following?
apt-get -f install rdnssd

Will that execute the solution aptitude install rdnssd suggested? I mean the one shown above, in my second post, which I did not dare to proceed.

Ohh…yes you will have resolve conflict. You should backup all the things and try it.

root@myserver:/home/myuser# apt-get -f install rdnssd
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:
 gnome-shell-common : Breaks: gnome-tweak-tool (< 3.21.91) but 3.14.2-2 is to be installed
 gsettings-desktop-schemas : Breaks: mutter (< 3.19.92) but 3.14.4-1~deb8u1 is to be installed
 ssowat : Depends: nginx-extras (>= 1.6.2) but it is not going to be installed
 yunohost : Depends: git but it is not going to be installed
            Depends: mariadb-server but it is not going to be installed or
                     mysql-server but it is not going to be installed
            Depends: php5-mysql but it is not going to be installed or
                     php5-mysqlnd but it is not installable
            Depends: slapd but it is not going to be installed
            Depends: postfix-policyd-spf-perl but it is not going to be installed
            Depends: nginx-extras (>= 1.6.2) but it is not going to be installed
            Depends: php5-fpm but it is not going to be installed
            Depends: php5-ldap but it is not going to be installed
            Depends: php5-intl but it is not going to be installed
            Recommends: php5-gd but it is not going to be installed
            Recommends: php5-curl but it is not going to be installed
            Recommends: php-gettext but it is not going to be installed
            Recommends: php5-mcrypt but it is not going to be installed
            Recommends: libdbd-ldap-perl but it is not going to be installed
            Recommends: libnet-dns-perl but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
root@myserver:/home/myuser#

Anyone around?
Any suggestion?

You could go on with aptitude to find a solution to your dependency hell.

Aptitude showed you one possible solution here:

If this solution is not satisfying (because you don’t wan’t to remove gnome for example) you may reject this solution (by hitting N instead of Ctrl+C as you did).
Then aptitude will try to compute another solution. You can iterate like that until you’re happy with the solution found by aptitude.

If the other solutions found by aptitude also suggest to remove gnome you can help aptitude by giving a hint that you really don’t want to remove gnome.
To do that, before rejecting the current solution, type “R1” and ENTER.
You can see in the output of your aptitude command that each part of the solution is given a number. The number 1 here correspond to “removing gnome”.

Thank you @pitchum, great explanations.

I am not an expert, and I do not know if it is ok to accept apptitude suggestions, please let me know your opinions.

When I installed this server for the first time, I could not install YunoHost as an .iso from scratch, I had some problems. So I installed Debian first, with full disk encryption, and then I installed YunoHost.

I do not know what the consequences of removing gnome are -actually I do not exactly know what the gnome package is. I am happy to accept aptitude suggestions but I am also wondering if that could affect my access to the server, as I need to locally enter the full-disk encryption password -with a local keyboard- right after pressing the power button of my server in order to boot it.

What are the consequences of removing gnome, network-manager and network-manager-gnome?

Will I be able to enter my full-disk encryption password when booting my server?

Give it a try, it is safe as long as you always press N to reject aptitude suggestions.

Gnome is a graphical interface for desktop users. You don’t really need a graphical interface on a server except if you also use your server as a desktop computer to browse the Web for example.

I’m not familiar with disk encryption but I’m pretty sure that the encryption password is asked in a console (no graphical interface), long before gnome is started. So I would say that you can safely remove gnome.
On the other hand if you remove network-manager you may need to reconfigure your network parameters (IP/DNS/etc.) manually after that.

Again I suggest that you let aptitude try to find a solution that doesn’t require to remove gnome nor network-manager. Such solution may not exist but it’s worth trying first.

Hey thank you very much!!
Upgraded!!

I started to play with your suggestions and then it suggested to remove rdnssd, I did it and everything started to work. I did not understand exactly what happened but I am happy now : )

And now I think I am going to uninstall gnome, as I don’t think I need that.

Cheers!