Log file contents:
An unhandled exception has been thrown:
Error: Class 'Memcached' not found in /var/www/nextcloud/config/config.php:1156
Stack trace:
#0 /var/www/nextcloud/lib/private/Config.php(214): include()
#1 /var/www/nextcloud/lib/private/Config.php(63): OC\Config->readData()
#2 /var/www/nextcloud/lib/base.php(140): OC\Config->__construct('/var/www/nextcl...')
#3 /var/www/nextcloud/lib/base.php(591): OC::initPaths()
#4 /var/www/nextcloud/lib/base.php(1068): OC::init()
#5 /var/www/nextcloud/console.php(46): require_once('/var/www/nextcl...')
#6 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#7 {main}
I checked the changelog from dev branch and this bug is solved. Sorry for the inconvenience.
@enolp
No worries ๐. Check existing (closed) issues about it to fix this on your system.
Fix is also already merged to beta branch.
Well @MichaIng , I've changed to beta branch and I still unable to install Nextcloud. I reopen the issue and copy what Dietpi shows me:
Log file contents:
In Install.php line 121:
Database <mysql> is not supported.
maintenance:install [--database DATABASE] [--database-name DATABASE-NAME] [--database-host DATABASE-HOST] [--database-port DATABASE-PORT] [--database-user DATABASE-USER] [--database-pass [DATABASE-PASS]] [--database-table-prefix [DATABASE-TABLE-PREFIX]] [--database-table-space [DATABASE-TABLE-SPACE]] [--admin-user ADMIN-USER] [--admin-pass ADMIN-PASS] [--data-dir DATA-DIR]
@enolp
Jep you need to remove the by faulty install script wrong placed config file, before reinstall/install does work again:
rm /var/www/nextcloud/config/config.php
rm /var/www/nextcloud/occ
dietpi-software install 114
Removing occ just prevents dietpi-services from printing errors about it. Although this should also be fixed in the beta.
I will add a check and autoremoval of faulty config.php during patch.
@MichaIng, your fix does not work and Dietpi shows me the same error. My second try was on a clean backup which I changed to beta branch (see 4th comment)
@enolp
Ah sorry didn't check your error log and made assumption too fast.
Database
is not supported.
Did they change something about the database argument naming?? I will try to replicate!
It is strange because Dietpi installs mariadb not mysql so I don't know whats happening
@MichaIng
Jep, on many distros, MySQL is just an alias for an actual MariaDB install. Since both are mostly compatible most software titles just use "mysql" which does include MariaDB.
Interesting, I didn't know
@enolp
Hmm very strange, install works very well here: [ OK ] DietPi-Software | ncc maintenance:install
This is a fresh install of Nextcloud on your system, right? Could you try to remove all Nextcloud related and do a very fresh install attempt:
rm -R /var/www/nextcloud
rm -R /mnt/dietpi_userdata/nextcloud_data
mysqladmin drop nextcloud -f
mysql -e "drop user oc_admin@localhost"
mysql -e "drop user oc_admin"
Then retry install.
The third command (also the 4rd and 5th) throws me an error:
mysqladmin: DROP DATABASE nextcloud failed;
error: 'Can't drop database 'nextcloud'; database doesn't exist'
When I install or update software I always make a dd backup of my SD in case something goes bad. Something I noted is that when you install PiHole, Dietpi installs mysql. Probably there is some conflict there.
@enolp
Jep expected that all of the above commands succeed/are required, depending on how far the actual installation went. But this is failsafe then, that every old, perhaps faulty trace of Nextcloud is purged before attempting fresh install.
When I install or update software I always make a dd backup of my SD in case something goes bad.
Best practice ๐
Something I noted is that when you install PiHole, Dietpi installs mysql. Probably there is some conflict there.
??? MariaDB is installed with Pi-hole? Should be not the case, also was not during my tests dome days ago. SQLite should be installed instead, which is what Pi-hole uses.
But even if it was, MariaDB/MySQL is a database server and can handle multiple software clients at once ๐.
Jep expected that all of the above commands succeed/are required, depending on how far the actual installation went. But this is failsafe then, that every old, perhaps faulty trace of Nextcloud is purged before attempting fresh install.
Was the first time I installed Nextcloud on this installation and two times (using dd backup) on a clean environment. I don't know what's hapening
??? MariaDB is installed with Pi-hole? Should be not the case, also was not during my tests dome days ago. SQLite should be installed instead, which is what Pi-hole uses.
But even if it was, MariaDB/MySQL is a database server and can handle multiple software clients at once
No, Dietpi installs "LLSP" sqlite (sorry for saying mysql) when installing Pi-Hole and Nextcloud installs LLMP (I think). I don't know if it makes conflict or what
@enolp
No, Dietpi installs "LLSP" sqlite (sorry for saying mysql) when installing Pi-Hole and Nextcloud installs LLMP (I think). I don't know if it makes conflict or what
Okay, jep as it should. Nope no conflicts by this. They share the webserver + PHP and use different databases.
โฌ: Ah wait, please try apt install php-mysql before doing Nextcloud install.
I just (when checking other stuff) by chance found that when webserver+PHP was already installed and then MariaDB and/or SQLite is installed afterwards (on separate dietpi-software run), the related PHP modules are not installed. Fixed already for v6.18 by: https://github.com/Fourdee/DietPi/pull/2214/commits/9149a2a7a55590a51db4a8ecb3a1a25966e1fd4c
So in your case, this really sounds as it is the reason for the ncc install error, and manually installing the PHP module should work them.
So if you recovered a backup where no Nextcloud install was attempted yet, then
sed -i "\|cp '/var/www/nextcloud/config/config.sample.php'|d" /DietPi/dietpi/dietpi-software
should be the only step required before installing Nextcloud.
If you already run into the error in OT, then do the steps above to remove all traces, before trying the reinstall.
If the Database <mysql> is not supported. error still occurs, then please send a dietpi-bugreport, as I never faced this and would need some deeper investigation.
I restored my previous backup, changed to beta branch and then run the sed command but it doesn't work, so i uploaded a bug report: f489c9d1-7964-4348-b501-c2de9bd420e1
@enolp
Did you try what I mentioned above: apt-get install -y php-mysql then rerun installation.
When I wrote my last comment I didn't see your updated comment, let me restore again my backup and do it all again
@enolp
Jep sorry that I didn't think about this earlier and that's for your effort ๐.
Ok, backup restored, branch changed to beta, php-mysql installed before installing Nextcloud, Nextcloud installed and all is working as expected. Nice!!!
Thanks for the support and the great job.
@enolp
Great, thanks for testing!
I mark the issue as closed then.
Most helpful comment
When I wrote my last comment I didn't see your updated comment, let me restore again my backup and do it all again