如何处理ownCloud升级错误?

Cloud storage

错误消息001

2021-01-25T06:13:54+00:00 Doctrine\DBAL\Exception\DriverException: An exception occurred while execu
D CONSTRAINT FK_F0C3D55B93CB796C FOREIGN KEY (file_id) REFERENCES oc_filecache (fileid) ON DELETE CA

SQLSTATE[HY000]: General error: 1005 Can't create table `owncloud`.`#sql-c8d_18` (errno: 150 "Foreig
2021-01-25T06:13:54+00:00 Update failed

处理方法001

mysql -uroot -p
use owncloud;
alter table oc_filecache engine = innodb;
alter table oc_filecache modify `fileid` bigint(20) not null auto_increment;
drop table oc_persistent_locks;

然后,再次运行升级命令,

sudo -u apache php /var/www/owncloud/occ upgrade

错误消息002

2021-01-25T08:04:51+00:00 Repair warning: Market app is unavailable for updating of apps. Please update manually, see https://doc.owncloud.org/server/10.5/go.php?to=admin-marketplace-apps
2021-01-25T08:04:51+00:00 Repair warning: You have incompatible or missing apps enabled that could not be found or updated via the marketplace.
2021-01-25T08:04:51+00:00 Repair warning: Please install or update the following apps manually or disable them with:
occ app:disable files_antivirus
occ app:disable files_pdfviewer
occ app:disable user_ldap
2021-01-25T08:04:51+00:00 Repair warning: For manually updating, see https://doc.owncloud.org/server/10.5/go.php?to=admin-marketplace-apps
2021-01-25T08:04:51+00:00 OC\RepairException: Upgrade is not possible
2021-01-25T08:04:51+00:00 Update failed

处理方法002

sudo -u apache php /var/www/owncloud/occ app:disable files_antivirus
sudo -u apache php /var/www/owncloud/occ app:disable files_pdfviewer
sudo -u apache php /var/www/owncloud/occ app:disable user_ldap

然后,再次运行升级命令,

sudo -u apache php /var/www/owncloud/occ upgrade

以上操作过后,需要手动更新被禁用的包,应用市场可参考如下链接,
https://marketplace.owncloud.com/apps

参阅文档
===============
https://central.owncloud.org/t/upgrade-from-10-0-10-4-to-10-2-1-4-foreign-key-error/21010/3

https://www.cmdschool.org/archives/3182

没有评论

发表回复

Cloud storage
如何输出NextCloud函数参数到日志?

1 前言 一个问题,一篇文章,一出故事。 笔者最近需要调试NextCloud的代码,因为需要监视参数 …

Cloud storage
如何使用Token认证API登录NextCloud?

1 前言 一个问题,一篇文章,一出故事。 笔者最近因为更换域名迁移用户而引发NextCloud客户端 …

Cloud storage
如何将NextCloud用户数据迁移给另一用户?

1 前言 一个问题,一篇文章,一出故事。 笔者发现NextCloud官方提供的如下数据迁移命令不是十 …