Cannot install nextcloud on fresh yunohost

Hi! Thanks for your cool work :smiley: . So, I was trying to install nextcloud on my raspberry pi using a fresh yunohost 3.0. First I had the same problem as the guy in here, which I solved as advised. Then I got “no space left on device” which I solved adding an external drive. Now, I get this logs:

The user nextcloud was not found

/etc/cron.d/nextcloud wasn’t deleted because it doesn’t exist.

Failed to reload php5-fpm.service: Unit php5-fpm.service not found.

/etc/php5/fpm/pool.d/nextcloud.conf wasn’t deleted because it doesn’t exist.

/etc/nginx/conf.d/mydomain.ynh.fr.d/nextcloud.conf wasn’t deleted because it doesn’t exist.

Avoid deleting .

Removing database nextcloud

!!

nextcloud’s script has encountered an error. Its execution was cancelled.

!!

ERROR 1007 (HY000) at line 1: Can’t create database ‘nextcloud’; database exists

I have absolutely no idea what is happening, as I am a bit newbie, so any help woul be appreciated. Cheers!

The issue seems to be this … Naively I’d think you made other install attempts which completely crashed for some reason (maybe you cancelled them manually) and they didn’t properly triggered the uninstall after the fail install.

Anyway, according to your logs, the existing database should have been cleaned now. So did you retry an install after this ?

Yep, that was exactly the thing; I tried installing it and failed, giving this error:

dpkg-preconfigure: unable to re-open stdin:

debconf: falling back to frontend: Teletype

debconf: (This frontend requires a controlling tty.)

debconf: unable to initialize frontend: Readline

debconf: falling back to frontend: Readline

debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)

debconf: unable to initialize frontend: Dialog

dpkg-preconfigure: unable to re-open stdin:

debconf: falling back to frontend: Teletype

debconf: (This frontend requires a controlling tty.)

debconf: unable to initialize frontend: Readline

debconf: falling back to frontend: Readline

debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)

debconf: unable to initialize frontend: Dialog

Then, when I try to install it for the second time, I get:

/etc/cron.d/nextcloud wasn’t deleted because it doesn’t exist.

Removing database nextcloud

!!

nextcloud’s script has encountered an error. Its execution was cancelled.

!!

Unable to install Nextcloud

2018-08-12 11:45:41 URL:https://download.nextcloud.com/server/releases/nextcloud-13.0.2.tar.bz2 [44842305/44842305] -> “app.tar.bz2” [1]

dpkg-preconfigure: unable to re-open stdin:

debconf: falling back to frontend: Teletype

debconf: (This frontend requires a controlling tty.)

debconf: unable to initialize frontend: Readline

debconf: falling back to frontend: Readline

debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)

debconf: unable to initialize frontend: Dialog

And this keeps happening, even when I try reinstalling a fresh image, even when I update previously or after I get the first error. I’m sorry for having not much idea, and thank you so much for your help

mh… can you do from CLI (connecting to ssh to your server from a terminal) ? :
sudo yunohost app install nexcloud --debug
and paste what happened in the terminal (hide passwords and other things.). To paste it, you can use : paste.yunohost.org .

Ok, I’ve tried reinstalling once again to ensure the problem is fully replicablle. I’ve installed yunohost 3.0.0.1 on a raspberry pi 3. Then, I’ve runned apt-get update && apt-get dist-upgrade to ensure everything is up to date. When it has finished, I’ve tried to install nextcloud, which gives this error log. Another trial gives this. The running of sudo yunohost app install nexcloud --debug gives this result. I haven’t annonymised passwords or domain or anything because they are a random string of automatically generated characters and as such I can easily change them ( I was a bit overwhelmed by the huge debug text to search for them, frankly)

Hi! Have you been able to find any solution to this?

Cheers

Non, I still don’t understand why

7 (HY000) at line 1: Can't create database 'nextcloud'; database exists

Because, as @Aleks said if there are a problem during the installation it removes it. So reinstalling it should solve the problem, and then it’s can’t exist anymore. :wink:

Can you one more time reinstall it with : sudo yunohost app install nexcloud --debug and copy/paste the log in the pastebin, and only log from installation(result of the command).

Ok, I’ve tried it once again. First, installing it through the web interface, i get this. Then, by installig it with the debug and CLI, I get this, and this when I try it again just in case. I’ve only copied the result from the command, as I was told. I read a “no space on device” somewhere, but it doesnt make much sense, as I have a 16 gb sd and, though I havent manually expanded the filesystem now, I did in other installs and kept getting errors. I’m really sorry for being such a pain in the ass, but I’ve tried at least 8 different times reinstalling and I’ve never been able to find a solution; I think it must have to do with the script. Has this been tried by anyone else on a raspberry? I bet yes, but I feel like this is completely rare

Thanks for your help

Btw I dont know if this might be of any help but Baikal has installed perfectly each of the 4 or so times I’ve tried

Have you changed the mysql password manually? if yes, you must copy this password in /etc/yunohost/mysql.

The error which is important here :

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111 "Connection refused")

And, I think it’s not the script. Nextcloud is an official app and has been tested many time.

Hi @Someone ,

If you want reinstall step-by-step from Raspbian Lite, first ask for domain recovery if you have one depending on YunoHost (e.g. : .nohost.me ; .noho.st ; .ynh.fr) Nohost domain recovery - Suppression de domaine en nohost.me, noho.st et ynh.fr, then when it’s done*, you can have a look here https://avignu.wiki.tuxfamily.org/doku.php?id=documentation:yunohost-stretch-v3.x.x.x-rpi_en

ppr

* This may take a while depending on the availability YunoHost’s team : they are volunteers.

Ok, thank you all for your help. Now I am in vacation, so I will not be able to do anything untill september, when I think I’ll go for the manual install from raspbian little, as @ppr has suggested, to see if I can make it work :p. And no @frju365, I have not changed the mysql psswd, so I don’t know :ok_woman:, lets hope the manual insta from raspbian works jeje.

Well, I just tried reinstalling it once again and boom! it worked. No idea what I did wrong the other times, thank you for your work anyways. How can I mark this as “solved”, or something?

I did it for you, but basically you can click the “…” icon at the left of ‘Reply’ (on the relevant post that solves the issue), then there’s an option to mark the post as solution :+1:

Ok, thanks!