Apt-get update no longer works due to owncloud changes

I have no idea what to do. I have removes owncloud from my ubuntu server but when i try to do an system update I get the response below. It means nothing to me but is obviously rooted in the owncloud update.
RESULT = I CAN NOT UPDATE MY SERVER.
ALSO EVERY TIME I TRIED TO APT-GET REMOVE OWNCLOUD IT KILLS MY WEBSITE BY MESSING UP THE MYSQL CFG CONFIGURATION
ALSO THIS WONT LET ME POST MORE THAN 2 LINKS SO I HAD TO EDIT EVERYTHING TO NOT BE A LINK.

Apt-get update && apt-get upgrade
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:2 http://mirrors.linode.com/ubuntu bionic InRelease
Hit:3 http://mirrors.linode.com/ubuntu bionic-updates InRelease
Hit:4 http://mirrors.linode.com/ubuntu bionic-backports InRelease
Hit:5 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:6 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease
Ign:7 http://attic.owncloud.org/download/repositories/production/Ubuntu_18.04  InRelease
Get:8 http://download.owncloud.org/download/repositories/production/Ubuntu_18.04  Release [970 B]
Get:9 http://download.owncloud.org/download/repositories/production/Ubuntu_18.04  Release.gpg [481 B]
Reading package lists... Done
E: Repository 'http://download.owncloud.org/download/repositories/production/Ubuntu_18.04  Release' changed its 'Origin' value from 'obs://s2.owncloud.com/ce:10.1/Ubuntu_18.04' to 'obs://s2.owncloud.com/ce:10.3/Ubuntu_18.04'
E: Repository 'http://download.owncloud.org/download/repositories/production/Ubuntu_18.04  Release' changed its 'Label' value from 'ce:10.1' to 'ce:10.3'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details

I did a google search for you: https://www.google.com/search?q="This+must+be+accepted+explicitly+before+updates+for+this+repository+can+be+applied." where the first result leads to

The page looks promising. Does it solve your problem?

2 Likes

Hi @hlpr,

I fixed your formatting issues.
If @cortho’s advice didn’t help:
You should be able to just remove the repo, as I recommend against upgrading using the package manager.

root@331a6b8ec924:/~ grep -r "download.owncloud" /etc/apt*
/etc/apt/sources.list.d/owncloud.list:deb http://download.owncloud.org/download/repositories/production/Ubuntu_19.10/ /
# Edit or remove the file 
root@331a6b8ec924:/~ nano  /etc/apt/sources.list.d/owncloud.list #comment out the line
root@331a6b8ec924:/~ rm  /etc/apt/sources.list.d/owncloud.list
root@331a6b8ec924:/~ apt-get update

I wonder why it would touch your my.cnf when uninstalling, that’s not right…

1 Like

Thanks eneubauer and cortho.
I’m not sure I understand why nano a file and then remove it. I will try just removing when the server is quiet tonight.
The apt-get remove owncloud doesn’t actually touch my my.cnf.
After a remove attempt, my site is dead because i cant make a connection to mysql so something has changed.

mysql -u root on the command line fails with the same error as my website.
mysql -u root
mysql: [Warning] skipping '!includedir /etc/mysql/conf.d/' directive as maximum includerecursion level was reached in file /etc/mysql/mysql.conf.d/my.cnf at line 20!
mysql: [Warning] skipping '!includedir /etc/mysql/mysql.conf.d/' directive as maximum includerecursion level was reached in file /etc/mysql/mysql.conf.d/my.cnf at line 21!
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

The fix is to reboot the server. No changes to the cnf files is needed.
Before rebooting, following the symlinks shows that everything is linked as it should be but it gives the error above.
All very strange.

Please read carefully.

You need to make sure that your my.cnf is not inside one of your include dirs.

1 Like

Thanks eneubauer.
I will have a play with the cnf files at some point but none of this is of my creation.
my.cnf in the mysql.conf.d folder is a symlink to /etc/alternatives/my.cnf. I didnt put it there.
It has been strange from the start.
I began with a clean ubuntu 18.04 and installed php and mysql, some other stuff and set up my site. This was running fine for months.
I then needed a clone of my server for a different domain for marketing reasons. I did a backup of my server and created another from it.
The clone didnt work. mysql refused to make a connection. The fix was to copy etc/mysql/mysql.cnf to etc/mysql/my.cnf.
I was a bit mad at my server people because it looked like the backup wasnt the same as the original.
A couple of months later, I rebooted my original server and it had the same problem as the clone. The copy mysql.cnf to my.cnf fixed it.
(At least I regained confidence in the backup/restore)
The only thing I can think that had happened was me installing owncloud on the original server before making the clone.
My conclusion is that the owncloud/mysql install upset the cnf setup.
The worst thing is that owncloud turned out to be useless because i cant backup my .htaccess files unless i switch from apache so I no longer need it on either server.
Thanks for your help.

I guess that’s why marketing people shouldn’t do the job of server people. — case closed

2 Likes