Problem by installing yunohost

Hello,
Can someone help me. I have a VPS and tried to install yunohost on it, via the Terminal. I have no knowledge of programming, but followed the instructions on the webpage. So I became root. That was not a problem. Entered the command for installing yunohost. “curl https://install.yunohost.org | bash” This started. Got two questions, both answered with Yes. After that I recall to have seen a mention of a failure, if I remenber well it was about the library. Unfortunately I haven’t made a screensave. I was to eager to go further. So I typed the IP adres in my browser and then … instead of the yunohost page, I got the welcompage of nginx.


So something went wrong.
I tried to start again, installing yunohost as I did before. Became root. This I can still become. Gave the command for installing yunohost, and then I got the message that I was doing an update and that it failed to do so:

```  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 22359  100 22359    0     0   158k      0 --:--:-- --:--:-- --:--:--  159k
[INFO] Running upgrade_system
[FAIL] Unable to update the system
[INFO] Installation logs are available in /var/log/yunohost-installation_20200510_145225.log

I don't know how to view the log and I'm afraid it won't make me much wiser.
What can I do now? 
Very grateful if someone can help me.
Karin

You can view the log with this command:
$ cat /var/log/yunohost-installation_20200510_145225.log
But tell us, what kind of VPS are you using ?
Is you’re server a Debian 9 Strecht OS (Yunohost is not running on Debian 10 Buster for now) ? Have you before run an update ?
$ apt update && apt upgrade
What is your sources.list, to see it :
$ cat /etc/apt/sources.list

TODO before:
Perhaps it is better for you to install a sudo user on you’re VPS and to configure the sudo user to be avalaible to connect by ssh you’re server and so not use the root account to do it …
Some details here can help you: https://www.digitalocean.com/community/tutorials/initial-server-setup-with-debian-9

thanks for your reaction.
I don’t know which Debian version is installed, it is Debian, so far I know. how can I see this?
No I haven’t run an update before. I just started.
I now have viewed the log, do you want to see it?

My source list:

# deb http://mirror.transip.net/debian/debian stretch main

deb http://mirror.transip.net/debian/debian stretch main
deb-src http://mirror.transip.net/debian/debian stretch main

deb http://security.debian.org/debian-security stretch/updates main
deb-src http://security.debian.org/debian-security stretch/updates main

# stretch-updates, previously known as 'volatile'
deb http://mirror.transip.net/debian/debian stretch-updates main
deb-src http://mirror.transip.net/debian/debian stretch-updates main

Ok, you are with a Debian 9, it is good.
But I think you must add repositories in your sources.list. You can edit it with this command (on root user):

nano /etc/apt/sources.list

and change the lines like this:

`# deb http://mirror.transip.net/debian/debian stretch main

deb http://mirror.transip.net/debian/debian stretch main contrib non-free
#deb-src http://mirror.transip.net/debian/debian stretch main contrib non-free

deb http://security.debian.org/debian-security stretch/updates main contrib non-free
#deb-src http://security.debian.org/debian-security stretch/updates main contrib non-free

#stretch-updates, previously known as ‘volatile’
deb http://mirror.transip.net/debian/debian stretch-updates main contrib non-free
#deb-src http://mirror.transip.net/debian/debian stretch-updates main contrib non-free`

and then do an update and upgrade (with root user) with:

apt update && apt upgrade

… Let’s not speculate on what’s the issue and let’s look at the log first …

… Just run the cat command suggested by rodinux in the first answer …

cat /var/log/yunohost-installation_20200510_145225.log

here’s my log, and thanks for looking at it:

[INFO] Running upgrade_system
Get:1 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Ign:2 http://mirror.transip.net/debian/debian stretch InRelease
Get:3 http://mirror.transip.net/debian/debian stretch-updates InRelease [91.0 kB]
Hit:4 http://mirror.transip.net/debian/debian stretch Release
Get:5 http://forge.yunohost.org/debian stretch InRelease [18.2 kB]
Get:6 http://security.debian.org/debian-security stretch/updates/main Sources [212 kB]
Get:7 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [526 kB]
Get:8 http://security.debian.org/debian-security stretch/updates/main Translation-en [233 kB]
Fetched 1,175 kB in 0s (1,447 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
libtext-iconv-perl is already the newest version (1.7-5+b4).
The following packages were automatically installed and are no longer required:
  bind9utils dnsutils fontconfig-config fonts-dejavu-core galera-3 git git-man
  glances javascript-common jq ldap-utils libaio1 libconfig-inifiles-perl
  libdbi-perl libdbus-glib-1-2 liberror-perl libfontconfig1 libgd3
  libhiredis0.13 libjbig0 libjemalloc1 libjpeg62-turbo libjq1 libjs-angularjs
  libjs-lodash libluajit-5.1-2 libluajit-5.1-common libnginx-mod-http-auth-pam
  libnginx-mod-http-cache-purge libnginx-mod-http-dav-ext
  libnginx-mod-http-echo libnginx-mod-http-fancyindex libnginx-mod-http-geoip
  libnginx-mod-http-headers-more-filter libnginx-mod-http-image-filter
  libnginx-mod-http-lua libnginx-mod-http-ndk libnginx-mod-http-perl
  libnginx-mod-http-subs-filter libnginx-mod-http-uploadprogress
  libnginx-mod-http-upstream-fair libnginx-mod-http-xslt-filter
  libnginx-mod-mail libnginx-mod-nchan libnginx-mod-stream libnss-ldapd
  libodbc1 libonig4 libpam-ldapd libreadline5 libtiff5 libwebp6 libxpm4
  libxslt1.1 libyaml-0-2 lua-json lua-ldap lua-lpeg lua-rex-pcre
  mariadb-client-10.1 mariadb-client-core-10.1 mariadb-common mariadb-server
  mariadb-server-10.1 mariadb-server-core-10.1 moulinette mysql-common
  netcat-openbsd nginx-common nginx-extras nslcd php-common php-mysql
  php7.0-common php7.0-mysql python-argcomplete python-bottle
  python-cffi-backend python-chardet python-cryptography python-dbus
  python-dnspython python-enum34 python-gevent python-gevent-websocket
  python-gnupg python-greenlet python-idna python-ipaddress python-jinja2
  python-ldap python-markupsafe python-miniupnpc python-openssl
  python-pkg-resources python-psutil python-pyasn1 python-requests
  python-setuptools python-six python-toml python-tz python-urllib3
  python-yaml python3-psutil rsync slapd socat ssl-cert ssowat sudo-ldap
  ttf-bitstream-vera unscd unzip
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up ssl-cert (1.0.39) ...
sed: -e expression #1, char 47: unterminated `s' command
dpkg: error processing package ssl-cert (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 ssl-cert
E: Sub-process /usr/bin/dpkg returned an error code (1)
[FAIL] Unable to update the system
[INFO] Installation logs are available in /var/log/yunohost-installation_20200510_145225.log

Can you trythis, run:
dpkg --configure -a
It seems there was a problem with the package ssl-cert. What happens if you try run this:
update-ca-certificates

I’ve run

dpkg --configure -a

I got this: > root@xxx-xxx-xxx-xxx:~# dpkg --configure -a

Setting up ssl-cert (1.0.39) …
sed: -e expression #1, char 47: unterminated `s’ command
dpkg: error processing package ssl-cert (–configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
ssl-cert

after that i’ve tried to run as you said:

then I got this:

root@xxx-xxx-xxx-xxx:~# update-ca-certificates
Updating certificates in /etc/ssl/certs…
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d…
done.

Then I thought to try again to update

but I got again an error message:

root@xxx-xxx-xxx-xxx:~# apt update && apt upgrade
Hit:1 Index of /debian-security stretch/updates InRelease
Hit:2 Index of /debian/ stretch InRelease
Ign:3 Index of /debian/debian stretch InRelease
Hit:4 Index of /debian/debian stretch-updates InRelease
Hit:5 Index of /debian/debian stretch Release
Reading package lists… Done
Building dependency tree
Reading state information… Done
All packages are up to date.
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
The following packages were automatically installed and are no longer required:
bind9utils dnsutils fontconfig-config fonts-dejavu-core galera-3 git git-man
glances javascript-common jq ldap-utils libaio1 libconfig-inifiles-perl
libdbi-perl libdbus-glib-1-2 liberror-perl libfontconfig1 libgd3
libhiredis0.13 libjbig0 libjemalloc1 libjpeg62-turbo libjq1 libjs-angularjs
libjs-lodash libluajit-5.1-2 libluajit-5.1-common libnginx-mod-http-auth-pam
libnginx-mod-http-cache-purge libnginx-mod-http-dav-ext
libnginx-mod-http-echo libnginx-mod-http-fancyindex libnginx-mod-http-geoip
libnginx-mod-http-headers-more-filter libnginx-mod-http-image-filter
libnginx-mod-http-lua libnginx-mod-http-ndk libnginx-mod-http-perl
libnginx-mod-http-subs-filter libnginx-mod-http-uploadprogress
libnginx-mod-http-upstream-fair libnginx-mod-http-xslt-filter
libnginx-mod-mail libnginx-mod-nchan libnginx-mod-stream libnss-ldapd
libodbc1 libonig4 libpam-ldapd libreadline5 libtiff5 libwebp6 libxpm4
libxslt1.1 libyaml-0-2 lua-json lua-ldap lua-lpeg lua-rex-pcre
mariadb-client-10.1 mariadb-client-core-10.1 mariadb-common mariadb-server
mariadb-server-10.1 mariadb-server-core-10.1 moulinette mysql-common
netcat-openbsd nginx-common nginx-extras nslcd php-common php-mysql
php7.0-common php7.0-mysql python-argcomplete python-bottle
python-cffi-backend python-chardet python-cryptography python-dbus
python-dnspython python-enum34 python-gevent python-gevent-websocket
python-gnupg python-greenlet python-idna python-ipaddress python-jinja2
python-ldap python-markupsafe python-miniupnpc python-openssl
python-pkg-resources python-psutil python-pyasn1 python-requests
python-setuptools python-six python-toml python-tz python-urllib3
python-yaml python3-psutil rsync slapd socat ssl-cert ssowat sudo-ldap
ttf-bitstream-vera unscd unzip
Use ‘apt autoremove’ to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up ssl-cert (1.0.39) …
sed: -e expression #1, char 47: unterminated `s’ command
dpkg: error processing package ssl-cert (–configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
ssl-cert
E: Sub-process /usr/bin/dpkg returned an error code (1)

Can you try run
apt install -f

of course I can
unfortunately I again got the same error

It really looks like it’s an issue in ssl-cert’s postinst script … But I can’t reproduce the issue on my side whatsoever …

Can you tell where you bought that VPS ?

Alternatively we can try to find why it’s not happy about the sed commands but that’s a bit technical …

I would run :

cd /root/
apt download ssl-cert
dpkg -e ./ssl-cert*.deb
grep -nr "sed" DEBIAN/postinst

I doubt is perhaps a problem with your sources.list. I wait before with @Aleks recomandantions…

I got the VPS via Waag.org on an information evening sponsored by www.transip.nl, I can use the VPS for 3 months, some people got through the installation, others like me not, at the Waag they couldn’t help me

I hope I have done this right, I just copy past the whole thing and got this:

‘’'root@xxx-xxx-xxx-xxx:~# cd /root/
root@xxx-xxx-xxx-xxx:~# apt download ssl-cert
Get:1 Index of /debian/debian stretch/main amd64 ssl-cert all 1.0.39 [20.8 kB]
Fetched 20.8 kB in 0s (0 B/s)
W: Download is performed unsandboxed as root as file ‘/root/ssl-cert_1.0.39_all.deb’ couldn’t be accessed by user ‘_apt’. - pkgAcquire::Run (13: Permission denied)
root@xxx-xxx-xxx-xxx:~# dpkg -e ./ssl-cert*.deb
root@xxx-xxx-xxx-xxx:~# grep -nr “sed” DEBIAN/postinst

Hm sorry my last command was buggy, not sure why but can you retry to launch just :

cat DEBIAN/postinst | grep sed

(Edit: ah in fact it’s some weird issue about using “ instead of " (different type of quote) ? … but whatever)

(and yes my fault, got the wrong " … now I’ve got the right one, I hope)

	     "$(openssl x509 -issuer -noout < ${CERT} | sed 's/issuer= //')" = "$(openssl x509 -subject -noout < ${CERT} | sed 's/subject= //')" ]; then

Hmokay so what happens if you run

CERT=/etc/ssl/certs/ssl-cert-snakeoil.pem
echo $(openssl x509 -issuer -noout < ${CERT} | sed 's/issuer= //')
echo $(openssl x509 -subject -noout < ${CERT} | sed 's/subject= //')

this:

root@xxx-xxx-xxx-xxx:~# echo $(openssl x509 -issuer -noout < ${CERT} | sed 's/issuer= //')
-su: /etc/ssl/certs/ssl-cert-snakeoil.pem: No such file or directory

root@xxx-xxx-xxx-xxx:~# echo $(openssl x509 -subject -noout < ${CERT} | sed 's/subject= //')
-su: /etc/ssl/certs/ssl-cert-snakeoil.pem: No such file or directory

Alright so that’s not the issue …

What happens if you run :

make-ssl-cert generate-default-snakeoil

this:

sed: -e expression #1, char 47: unterminated `s' command

Hmokay so that’s closer to the issue …

Does the command 'hostname' returns anything ? (Sorry I know that’s a bunch of weird questions)