I formated a USB key, moved the user dir, then tried to install nextcloud only.
Nextcloud to install
it crash after those console lines :
Enabling dietpi-nextcloud: ok
Run "service lighttpd force-reload" to enable changes
Enabling dietpi-dav_redirect: ok
Run "service lighttpd force-reload" to enable changes
[ INFO ] DietPi-Software | Enable 4-byte support for MariaDB
[ OK ] DietPi-Software | systemctl restart mysql
[FAILED] DietPi-Software | ncc maintenance:install
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}
After more tests and tries :
A failed NextCloud installation attempt breaks DietPi-Services.
I tried with a freshly flashed SD card on a RasPi 3B. I can even install owncloud before and have it working.
Is there a way to roll back the DietPi stack on a previous version?
@webtroter
Thanks for your report.
Could you please send a bugreport: dietpi-bugreport 1
And paste the content of your config.php: cat /var/www/nextcloud/config/config.php
_( Erase/anonymize passwords, domain and other private info of course! )_
Error: Class 'Memcached' not found in
🤔 Hmm, we configure APCu and Redis, not Memcached, was this a fresh Nextcloud install or did you migrate from another instance/server?
€: Okay not needed, could replicate the same error on VM. Nextcloud seems to have changed something about how config.php is pre-generated/used. In the past there was simply no config.php before install has finished. Now a large default config.php is in place, that seems to be not always compatible.
I am having a similar issue.
Fri Oct 26 15:23:33 2018 (17378): Fatal Error Zend OPcache cannot allocate buffer for │ interned strings
Particulary when this command is executed:
ncc maintenance:mode --on
Fri Oct 26 15:17:30 2018 (15240): Fatal Error Zend OPcache cannot allocate buffer for interned strings
'memcache.distributed' => '\OC\Memcache\Memcached',
...
/**
* Server details for one or more memcached servers to use for memory caching.
*/
'memcached_servers' => array(
// hostname, port and optional weight. Also see:
// http://www.php.net/manual/en/memcached.addservers.php
// http://www.php.net/manual/en/memcached.addserver.php
array('localhost', 11211),
//array('other.host.local', 11211),
),
/**
* Connection options for memcached, see http://apprize.info/php/scaling/15.html
*/
'memcached_options' => array(
// Set timeouts to 50ms
\Memcached::OPT_CONNECT_TIMEOUT => 50,
\Memcached::OPT_RETRY_TIMEOUT => 50,
\Memcached::OPT_SEND_TIMEOUT => 50,
\Memcached::OPT_RECV_TIMEOUT => 50,
\Memcached::OPT_POLL_TIMEOUT => 50,
// Enable compression
\Memcached::OPT_COMPRESSION => true,
// Turn on consistent hashing
\Memcached::OPT_LIBKETAMA_COMPATIBLE => true,
// Enable Binary Protocol
\Memcached::OPT_BINARY_PROTOCOL => true,
// Binary serializer vill be enabled if the igbinary PECL module is available
//\Memcached::OPT_SERIALIZER => \Memcached::SERIALIZER_IGBINARY,
),
This must fail, if php-memcached is not installed. And we don't want it, since we don't need it, since we don't have a distributed server usually. And if, Redis still makes more sense...
Also the other pre-existing entries break our install and configuration effort.
/**
* This example shows how to configure Nextcloud to store all files in a
* swift object storage.
*
* It is important to note that Nextcloud in object store mode will expect
* exclusive access to the object store container because it only stores the
* binary data for each file. The metadata is currently kept in the local
* database for performance reasons.
*
* WARNING: The current implementation is incompatible with any app that uses
* direct file IO and circumvents our virtual filesystem. That includes
* Encryption and Gallery. Gallery will store thumbnails directly in the
* filesystem and encryption will cause severe overhead because key files need
* to be fetched in addition to any requested file.
*
* One way to test is applying for a trystack account at http://trystack.org/
*/
'objectstore' => [
'class' => 'OC\\Files\\ObjectStore\\Swift',
'arguments' => [
// trystack will use your facebook id as the user name
'username' => 'facebook100000123456789',
// in the trystack dashboard go to user -> settings -> API Password to
// generate a password
'password' => 'Secr3tPaSSWoRdt7',
// must already exist in the objectstore, name can be different
'container' => 'nextcloud',
// prefix to prepend to the fileid, default is 'oid:urn:'
'objectPrefix' => 'oid:urn:',
// create the container if it does not exist. default is false
'autocreate' => true,
// required, dev-/trystack defaults to 'RegionOne'
'region' => 'RegionOne',
// The Identity / Keystone endpoint
'url' => 'http://8.21.28.222:5000/v2.0',
// required on dev-/trystack
'tenantName' => 'facebook100000123456789',
// dev-/trystack uses swift by default, the lib defaults to 'cloudFiles'
// if omitted
'serviceName' => 'swift',
// The Interface / url Type, optional
'urlType' => 'internal'
],
],
This is an example in how and what you can configure, but no working default file. This and many following entries must fail, if nothing related set up before.
Trying to remove this wrong default file before attempting install.
Where is this file located? I do not understand. What does it have to do with nextcloud installation?
This was a fresh install on a fresh SD card. On a rpi 3B. I will get back
with the info you ask, it might take me some time since I would have to
reflash everything.
On Fri., Oct. 26, 2018, 08:32 Twilight0, notifications@github.com wrote:
Where is this file located? I do not understand. What does it have to do
with nextcloud installation?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Fourdee/DietPi/issues/2184#issuecomment-433392081,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH_4-OvcaehlisdmgOfcEX4a6HRf1EHlks5uowD6gaJpZM4X7TxF
.
Okay guys, at least a simple solution:
We need to remove the (why ever) wrong placed example config.php before attempting the Nextcloud install command:
€: sed -i '/G_ERROR_HANDLER_COMMAND=\'ncc maintenance:install\'/a\rm $config_php' /DietPi/dietpi/dietpi-softwaresed -i "\|cp '/var/www/nextcloud/config/config.sample.php'|d" /DietPi/dietpi/dietpi-software
To stop ncc maintenance mode related error messages, remove existing nextcloud/occ file:
rm /var/www/nextcloud/occ
Then rerun the dietpi-software to install Nextcloud. Short command: dietpi-software install 114
@Twilight0
This is the file that contains the Nextcloud configuration and setup info, database credentials etc. etc. There was always an example file that contained all possible settings and explanations, but many settings need e.g. certain PHP modules or other software set up outside of Nextcloud. So this example config file cannot be used as default. It was never, no idea why/what Nextcloud changed there. I will open a ticket on their GitHub to check. Perhaps an accident.
@webtroter
Not required any more. Simply run the commands above to solve the issue. But many thanks for your offer to investigate 👍.
Okay found the reason: https://github.com/Fourdee/DietPi/commit/e0f4c883611cb413d0be9c4669981cf4ca584acf#r31060077
Accidental wrong fix in this case.
So the better fix is: sed -i "\|cp '/var/www/nextcloud/config/config.sample.php'|d" /DietPi/dietpi/dietpi-software
the sed line seems not complete. Bash asks me to close something, and I don't really know sed.

I could not reinstall NextCloud on the Pi. I will reflash and retry later tonight
Since the sed query didn't work, I simply removed the line in the dietpi-software script.
@webtroter
Strange, escaping the single quote ' somehow does not work. sed -i "\|cp '/var/www/nextcloud/config/config.sample.php'|d" /DietPi/dietpi/dietpi-software works then (🈯️ test succeed). Jep of course manually remove the line works as well, I just wanted to prevent the manual edit + searching for correct line.
Ah jep (re)install did not work, since the wrong config.php is already in place and needs to be removed as well 🙈.
So complete fix:
sed -i "\|cp '/var/www/nextcloud/config/config.sample.php'|d" /DietPi/dietpi/dietpi-software
rm /var/www/nextcloud/config/config.php
rm /var/www/nextcloud/occ
dietpi-software install 114
The initial reason for the config.php copy was a rare issue that can occur during install:
Okay PR is up: https://github.com/Fourdee/DietPi/pull/2186
Okay PR is up: #2186
Testing/testers required 🔽
How can I test on fresh installs?
I think this is a better question :
How can I merge the PR locally on the pi and then update dietpi?
@webtroter
Once we've ran local testing, we'll release to Beta for public testing. Will let you know when its ready + instructions to install Beta.
Test:
@webtroter
Fix is available in our Beta version, please see following link for more information:
https://github.com/Fourdee/DietPi/blob/master/BRANCH_SYSTEM.md#steps-to-use-the-dietpi-beta-branch
In most cases the quick fix above will work as well, simply removing the faulty config.sample.php copy:
sed -i "\|cp '/var/www/nextcloud/config/config.sample.php'|d" /DietPi/dietpi/dietpi-software
# Below only, if you already ran into the broken install:
rm /var/www/nextcloud/config/config.php
rm /var/www/nextcloud/occ
dietpi-software install 114
The other parts of the PR only deal/workaround the rare situation that was the reason to add the config.sample.php copy.
As completed with testing passed and workaround for pre-existing issue, will mark as closed. Please reopen if required.