如何处理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
如何部署基于Nginx部署NextCloud?

1 前言 一个问题,一篇文章,一出故事。 以往使用LAMP环境部署的NextCloud已经工作良久, …

Cloud storage
如何修复NextCloud通讯录图片损坏问题?

1 前言 一个问题,一篇文章,一出故事。 笔者最近需要测试升级NextCloud,发现通讯录显示损坏 …

Cloud storage
如何迁移NextCloud数据目录?

1 前言 一个问题,一篇文章,一出故事。 笔者需要迁移NextCloud的默认数据目录“/var/w …