Problems upgrading from 7.x to 8.x; php dependency not correctly resolved

php
upgrade
help

#1

Please help us by providing the following info. Before posting please also check the pinned "Known issues" threads and make sure that you're running the latest available version for your oC release: https://owncloud.org/changelog/

Steps to reproduce
1. Install owncloud.noarch 7.0.4-17.1 from isv_ownCloud_community repository
2.Install php54 2.0=1.el6 from rhel-x86_64-server-6-rhscl-1
3. Attempt to upgrade using 'yum upgrade'

Expected behaviour
owncloud.noarch would be upgraded to version 8.1.9-12.1

Actual behaviour

    Error: Package: owncloud-server-8.1.9-12.1.noarch (isv_ownCloud_community)
               Requires: php >= 5.4.0
                Installed: php-5.3.3-48.el6_8.x86_64 (@rhel-x86_64-server-6)

Server configuration
Operating system: RHEL 6.3
Web server: Apache 2.2.15 (Red Hat)
Database: PostgressSQ
PHP version: php5.4 and php5.3 both installed on server, apache is using 5.4
ownCloud version (see ownCloud admin page): 7.0.4 (stable)
Updated from an older ownCloud or fresh install: Trying to install 8.1.9-12.1 from repository.
ownCloud log (data/owncloud.log, see https://central.owncloud.org/t/how-to-find-webserver-or-oc-logfile-enable-php-logfile/808):

Special configuration (external storage, external authentication, reverse proxy, server-side-encryption):
Apache is configured to use the 5.4 rather than the 5.3 version of php

I've managed to successfully install php and point the apache at the php5.4 version (I can verify this with phpinfo). However, during the upgrade process I get the following error:

$ sudo yum update 
Loaded plugins: product-id, refresh-packagekit, rhnplugin, search-disabled-repos, security,
              : subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package owncloud.noarch 0:7.0.4-17.1 will be obsoleted
---> Package owncloud-3rdparty.noarch 0:7.0.4-17.1 will be obsoleted
---> Package owncloud-config-apache.noarch 0:8.1.9-12.1 will be obsoleting
---> Package owncloud-server.noarch 0:8.1.9-12.1 will be obsoleting
--> Processing Dependency: php >= 5.4.0 for package: owncloud-server-8.1.9-12.1.noarch
--> Finished Dependency Resolution
Error: Package: owncloud-server-8.1.9-12.1.noarch (isv_ownCloud_community)
           Requires: php >= 5.4.0
           Installed: php-5.3.3-48.el6_8.x86_64 (@rhel-x86_64-server-6)
               php = 5.3.3-48.el6_8
           Available: php-5.3.2-6.el6.x86_64 (rhel-x86_64-server-6)
               php = 5.3.2-6.el6
           Available: php-5.3.2-6.el6_0.1.x86_64 (rhel-x86_64-server-6)
               php = 5.3.2-6.el6_0.1
           Available: php-5.3.3-3.el6.x86_64 (rhel-x86_64-server-6)
               php = 5.3.3-3.el6
           Available: php-5.3.3-3.el6_1.3.x86_64 (rhel-x86_64-server-6)
               php = 5.3.3-3.el6_1.3
           Available: php-5.3.3-3.el6_2.5.x86_64 (rhel-x86_64-server-6)
               php = 5.3.3-3.el6_2.5
           Available: php-5.3.3-3.el6_2.6.x86_64 (rhel-x86_64-server-6)
               php = 5.3.3-3.el6_2.6
           Available: php-5.3.3-3.el6_2.8.x86_64 (rhel-x86_64-server-6)
               php = 5.3.3-3.el6_2.8
           Available: php-5.3.3-14.el6_3.x86_64 (rhel-x86_64-server-6)
               php = 5.3.3-14.el6_3
           Available: php-5.3.3-22.el6.x86_64 (rhel-x86_64-server-6)
               php = 5.3.3-22.el6
           Available: php-5.3.3-23.el6_4.x86_64 (rhel-x86_64-server-6)
               php = 5.3.3-23.el6_4
           Available: php-5.3.3-26.el6.x86_64 (rhel-x86_64-server-6)
               php = 5.3.3-26.el6
           Available: php-5.3.3-27.el6_5.x86_64 (rhel-x86_64-server-6)
               php = 5.3.3-27.el6_5
           Available: php-5.3.3-27.el6_5.1.x86_64 (rhel-x86_64-server-6)
               php = 5.3.3-27.el6_5.1
           Available: php-5.3.3-27.el6_5.2.x86_64 (rhel-x86_64-server-6)
               php = 5.3.3-27.el6_5.2
           Available: php-5.3.3-38.el6.x86_64 (rhel-x86_64-server-6)
               php = 5.3.3-38.el6
           Available: php-5.3.3-40.el6_6.x86_64 (rhel-x86_64-server-6)
               php = 5.3.3-40.el6_6
           Available: php-5.3.3-46.el6_6.x86_64 (rhel-x86_64-server-6)
               php = 5.3.3-46.el6_6
           Available: php-5.3.3-46.el6_7.1.x86_64 (rhel-x86_64-server-6)
               php = 5.3.3-46.el6_7.1
           Available: php-5.3.3-47.el6.x86_64 (rhel-x86_64-server-6)
               php = 5.3.3-47.el6
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

php5.4 is installed, so somehow the dependency check is failing. Note that the php54 version is installed using the scl mechansim, so:

$ which php
/opt/rh/php54/root/usr/bin/php
$ php -v
PHP 5.4.40 (cli) (built: Jul 22 2016 07:31:37) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
$ /usr/bin/php -v
PHP 5.3.3 (cli) (built: Jul 25 2016 05:47:24) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

How do I get yum to recognize that I've got the right version of php installed?


#2

I tried making /usr/bin/php point to the 5.4 version rather than the 5.3 version, but that does not seem to have resolved the issue.


#3

No idea about the dependencies but please be aware that you can't directly upgrade from 7.0.4 to 8.1.9:

https://doc.owncloud.org/server/8.1/admin_manual/maintenance/package_upgrade.html#upgrading-across-skipped-releases

Your upgrade path would be:

7.0.4 -> 7.0.15 -> 8.0.14 -> 8.1.9


#4

This does not work.
yum list available owncloud only lists the 8.1.9 version; so I can't go step by step.

I think the solution is to try to manual upgrade process listed at
https://doc.owncloud.org/server/8.1/admin_manual/maintenance/manual_upgrade.html


#5

Please see the already posted link above where it is described where you get the repositories providing older oC versions like 7.0.x and 8.0.x


#6

I was getting all kinds of weird dependency issues. I finally figured out that if disabled the current release, I could probably focus on just the 7.0.4 to 7.0.15 step.

I did this by issuing the command:
sudo mv isv:ownCloud:community.repo isv:ownCloud:community.repox
(in the /etc/yum.repos.d/ directory).

However, now I get a problem:
sudo yum upgrade owncloud
=======================================================================================================
Package Arch Version Repository Size
=======================================================================================================
Updating:
owncloud noarch 7.0.15-1.1 isv_ownCloud_community_7.0 27 M
Updating for dependencies:
owncloud-3rdparty noarch 7.0.15-1.1 isv_ownCloud_community_7.0 289 k

Transaction Summary
=======================================================================================================
Upgrade       2 Package(s)

Total download size: 28 M
Is this ok [y/N]: y
Downloading Packages:
http://download.opensuse.org/repositories/isv%3A/ownCloud%3A/community%3A/7.0/RedHat_RHEL6/noarch/owncloud-7.0.15-1.1.noarch.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.

Is there another source for those RPMs? Or another way I can do this upgrade?


#7

Mhhh, quite strange. That file is there:

http://download.opensuse.org/repositories/isv:/ownCloud:/community:/7.0/RedHat_RHEL6/noarch/


#8

That isn't a real file. Downloading it generates a 303 Found file pointing me at:
http://opensuse.c3sl.ufpr.br/repositories/isv:/ownCloud:/community:/7.0/RedHat_RHEL6/noarch/owncloud-3rdparty-7.0.15-1.1.noarch.rpm

Trying to follow that link generates a 404 error.


#9

Then please report a new issue to:

https://github.com/owncloud/core/issues


#10

After some delays with getting the packages, going through the manual upgrade steps seems to have solved the issue. In particular, the upgrade to 8.0.15 included the package owncloud-server-scl-php54.noarch 0:8.0.15-2.1 which seems to have resolved the dependency.

There was no ownCloud 8.0 Channel for RHEL, so I had to use the CentOS channel instead. I'm not sure if the problem is that the package was missing from the 8.1 direct upgrade or the RHEL package. In this case, I'm not sure if the best way to support RHEL is to just tell them to use the CentOS channel.

I think we can mark this one as solved. Thanks for the help and suggestions.