I am getting an installation error

What type of hardware are you using: VPS bought online
What YunoHost version are you running: last version
How are you able to access your server: SSH
Are you in a special context or did you perform specific tweaking on your YunoHost instance ?: SSH

Describe your issue

I get this error while installing yunohost on VDS server.
I have just started to install yunohost and I cannot solve some problems because I do not have much knowledge. Can you help me?

Share relevant logs or error messages

apt-get install --assume-yes -o Dpkg::Options::=–force-confold libtext-iconv-perl’ failed.

I get this error I tried to install it and got this error:
Running newaliases
newaliases: warning: valid_hostname: numeric hostname: 185.255…
newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: 185.255…
dpkg: error processing package postfix (–configure):
installed postfix package post-installation script subprocess returned error exit status 75
Errors were encountered while processing:
postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)

Hi ugukkiraz,

Which ‘it’ is it that you want to install? I see an apt-get command, but I think that is not the command that you executed yourself directly. Is it part of a Yunohost app?

Edit to add:

I see you have been struggling with this problem before. Would you mind running and posting the output of

$ cat /etc/postfix/main.cf|grep myhostname

Please use the formatting buttons when writing your post, it helps to make things more readable for visitors trying to help!

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
myhostname = 185.255.4.90
mydestination = $myhostname, /etc/mailname, 185.255.4.90, localhost.255.4.90, localhost

Ah! That is the problem. It should be a name, not a number.

What is the output of

$ hostname -f

I changed the host name and it worked, thanks.

Now I’m getting this error while installing :

5/5 • Installing YunoHost

    'apt-get install --assume-yes -o Dpkg::Options::=--force-confold -o APT::install-recommends=true yunohost yunohost-admin postfix' failed. Please check /var/log/yunohost-installation_20250122_104006.log for debugging

[FAIL] Installation of Yunohost packages failed

When I install this command alone, this screen appears, what should I do?

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
postfix is already the newest version (3.7.11-0+deb12u1).
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:
 yunohost : Depends: postfix-ldap but it is not installable
            Depends: postfix-policyd-spf-perl but it is not installable
            Depends: postfix-pcre but it is not installable
            Depends: dovecot-core but it is not installable
            Depends: dovecot-ldap but it is not installable
            Depends: dovecot-lmtpd but it is not installable
            Depends: dovecot-managesieved but it is not installable
            Depends: dovecot-antispam but it is not installable
            Depends: opendkim-tools but it is not installable
            Depends: opendkim but it is not installable
            Depends: postsrsd but it is not installable
            Depends: procmail but it is not installable
            Depends: mailutils but it is not installable
            Depends: acl but it is not installable
            Depends: git but it is not installable
            Depends: unzip but it is not installable
            Depends: jq but it is not installable
            Depends: bc but it is not installable
            Depends: at but it is not installable
            Depends: j2cli but it is not installable
            Depends: haveged but it is not installable
            Depends: fake-hwclock but it is not installable
            Recommends: yunohost-portal (>= 12.0) but it is not going to be installed
            Recommends: ntp but it is not installable
            Recommends: unattended-upgrades but it is not installable
            Recommends: libdbd-ldap-perl but it is not installable
            Recommends: libnet-dns-perl but it is not installable
E: Unable to correct problems, you have held broken packages.

Great!

The error says

Please check /var/log/yunohost-installation_20250122_104006.log for debugging

Was there any hint in that file?

It may be that the previous installation attempt already wrote your IP address as hostname into some of the configuration files.
One that comes to mind is main.cf, because of the previous

newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: 185.255…

You could check that one by

$ cat /etc/postfix/main.cf | grep myhostname

and verifying the output.

That would mean retrying installation, check errors, manually correct configuration, retry installation, and so on.

Alternative: you know how to find and correct the hostname now. I think the easiest way is now to redeploy Debian on your VPS and restart the installation.

Depending on your host, it should take seconds to minutes to redeploy Debian, and depending on the specs of the VPS, the same goes for installation of Yunohost. It would be way less frustrating than troubleshooting the system even before you get started.

apt is a bit of a pain because typically it doesn’t really explain what’s the issue when there’s a dependency problem …

We can try to force to spit out the actual issue by adding some package that seem problematic in the command line. Let’s try something like :

apt-get install --assume-yes -o Dpkg::Options::=--force-confold -o APT::install-recommends=true yunohost yunohost-admin postfix postfix-ldap dovecot-core opendkim acl yunohost-portal  libdbd-ldap-perl j2cli haveged postsrsd
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package postfix-ldap is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package dovecot-core is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package opendkim is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package postsrsd is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package acl is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package j2cli is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package haveged is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package libdbd-ldap-perl is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'postfix-ldap' has no installation candidate
E: Package 'dovecot-core' has no installation candidate
E: Package 'opendkim' has no installation candidate
E: Package 'acl' has no installation candidate
E: Package 'libdbd-ldap-perl' has no installation candidate
E: Package 'j2cli' has no installation candidate
E: Package 'haveged' has no installation candidate
E: Package 'postsrsd' has no installation candidate

This is the result

Uh wokay then it feels like the debian repo disappeared from your install … or maybe just need a apt update (but that should have been done by the install script)

What does apt update display ?

Hit:1 https://forge.yunohost.org/debian bookworm InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.

Be sure you are on debian 12

Debian versiyon 12.9 VPS

What local language is it set? Could it be Turkish?

Turkish :slight_smile:

@Aleks could it be the same issue as discussed before in the forum or github (I don’t remember)?

Try reinstalling debian with English language and retry the yunohost install
Afterwards you can change the language

1 Like

I tried in English and it still gives the same error.

Can you share the output of

cat /etc/apt/sources.list.d/*.list
cat /etc/apt/sources.list

#deb https://deb.debian.org/debian bookworm main non-free-firmware
#deb-src https://deb.debian.org/debian bookworm main non-free-firmware

#deb https://security.debian.org/debian-security bookworm-security main non-free-firmware
#deb-src https://security.debian.org/debian-security bookworm-security main non-free-firmware

#deb https://deb.debian.org/debian bookworm-updates main non-free-firmware
#deb-src https://deb.debian.org/debian bookworm-updates main non-free-firmware

deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware

I edited them like this and it installed but now I get this error. There is no app to list here, either because no web app yet is installed on the server, or because you don’t have access to any. Please check with the admins of the server for more infos!