Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Owncloud ubuntu package: php5 dependency #20963

Closed
Pegasuz opened this issue Dec 5, 2015 · 115 comments
Closed

Owncloud ubuntu package: php5 dependency #20963

Pegasuz opened this issue Dec 5, 2015 · 115 comments

Comments

@Pegasuz
Copy link

Pegasuz commented Dec 5, 2015

I am using the ubuntu 14.04 package on my server and would like to upgrade to php7 (currently using php5.6 mod_apache).
The owncloud-server package (version 8.2.1) however depends on php5.
So it is currently not possible to upgrade to php7.

@RobinMcCorkell
Copy link
Member

cc @jnweiger

@Akhenaton
Copy link

:~$ apt-cache depends owncloud-server
owncloud-server
Dépend: php5
|Dépend: php5-mysqlnd
Dépend: php5-mysql
Dépend: php5-sqlite
Dépend: php5-pgsql
Dépend: php5-common
Dépend: php5-gd
Dépend: php-xml-parser
Dépend: php5-intl
Dépend: php5-mcrypt
Dépend: php5-curl
Dépend: php5-json
Dépend: php5-ldap
Dépend: php5-cli

You could add the redis mod

@enoch85
Copy link
Member

enoch85 commented Dec 7, 2015

I have the same problem. One way to solve this could be: http://askubuntu.com/a/237354 But I have not tested that solution yet. If anyone does, please let me know how it went.

EDIT: Did not work.

@jnweiger
Copy link
Contributor

jnweiger commented Dec 7, 2015

sidenote: Redis is even difficult with php5: the ubuntu-14.04 php5-redis module is too old, they say:
http://www.kiloroot.com/a-guide-to-owncloud-8-ubuntu-14-04-and-caching-apcu-redis-cache-and-file-locking-oh-my/

@enoch85
Copy link
Member

enoch85 commented Dec 7, 2015

@jnweiger That's why you have to build it: https://www.techandme.se/how-to-configure-redis-cache-in-ubuntu-14-04-with-owncloud/

pecl install works and provides 2.2.7

@jnweiger
Copy link
Contributor

jnweiger commented Dec 7, 2015

I've started somewhat. Feel free to improve: owncloud-archive/vm@252ddbd

@enoch85
Copy link
Member

enoch85 commented Dec 7, 2015

@jnweiger If you want to install an old redis server version, that looks fine. 👍

@jnweiger
Copy link
Contributor

jnweiger commented Dec 7, 2015

It's a production system. Compilers should run elsewhere.

@enoch85
Copy link
Member

enoch85 commented Dec 7, 2015

@jnweiger What about the original issue ---^ ?

@RobinMcCorkell
Copy link
Member

Please don't add a dependency on php-redis on owncloud-server, at most it should be an optional dependency, definitely not required or recommended

@karlitschek
Copy link
Contributor

Yes. This is optional and only important for big installations.

@Akhenaton
Copy link

Well, yes, i should have said "optional" or "recommended" only. I have Redis server v=3.0.5 here and it works like a charm with ownCloud.

@enoch85
Copy link
Member

enoch85 commented Dec 8, 2015

FYI:

root@owncloud:/etc/redis# apt-mark hold owncloud owncloud-server owncloud-config-apache
owncloud set on hold.
owncloud-server set on hold.
owncloud-config-apache set on hold.
root@owncloud:/etc/redis# apt-get install php7.0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 owncloud-server : Depends: php5 (>= 5.4.0) but it is not going to be installed
                   Depends: php5-mysqlnd but it is not going to be installed or
                            php5-mysql but it is not going to be installed
                   Depends: php5-sqlite but it is not going to be installed
                   Depends: php5-pgsql but it is not going to be installed
                   Depends: php5-common but it is not going to be installed
                   Depends: php5-gd but it is not going to be installed
                   Depends: php5-intl but it is not going to be installed
                   Depends: php5-mcrypt but it is not going to be installed
                   Depends: php5-curl but it is not going to be installed
                   Depends: php5-json but it is not going to be installed
                   Depends: php5-ldap but it is not going to be installed
                   Depends: php5-cli but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
root@owncloud:/etc/redis# 

@jnweiger
Copy link
Contributor

jnweiger commented Dec 8, 2015

The correct solution is to have an owncloud package without any dependencies. this may be helpful with many other dependency issues too.
I'll add an experimental package owncloud-base to https://download.owncloud.org/download/repositories/8.2:/testing/owncloud-base

@enoch85
Copy link
Member

enoch85 commented Dec 8, 2015

If you decide to go that path it has to be clear in the docs which php modules that are needed to make ownCloud run properly. cc @carlaschroder

@enoch85
Copy link
Member

enoch85 commented Dec 9, 2015

  1. Removed ownCloud (purged everything)
  2. Deleted ownCloud dir inlcuding the data folder
  3. Replaced owncloud.list with the new one.
  4. Installed php7.0*

Actual result

root@owncloud:/# apt-get install owncloud-base 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 owncloud-base : Depends: php5-cgi but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@owncloud:/# 

EDIT
Same error if I do a completely fresh install of a new OS and everything.

EDIT 2
It works if you install from archive and all the php-modules seperatly. I will fix a VM tomorrow with ownCloud 8.2.1 and PHP 7.

@enoch85
Copy link
Member

enoch85 commented Dec 9, 2015

The VM is released, thought you would like to know: https://www.techandme.se/owncloud-8-2-1-php-7-redis-cache-lets-encrypt-webmin/

@jospoortvliet
Copy link

btw I just installed php 7 + all the needed php 7 modules on openSUSE 13.2. It overwrote a few files due to conflicts but otherwise, everything was smooth and worked after I removed apcu caching from the config.php. I still have php5 installed, will remove it once ownCloud-server won't also be removed ;-)

@MrGraversen
Copy link

Well, so much for "PHP 7 Is Here And ownCloud Is Ready"... any news on the issue?

@enoch85
Copy link
Member

enoch85 commented Dec 15, 2015

@MrGraversen ownCloud works with PHP 7, just download the VM and give it a try. ;) You could get it working with ownCloud with some hacking in Ubuntu.

EDIT Something like:

  1. Move your data and config to another location.
  2. Purge ownCloud
  3. Download the ownCloud zip or tar package, to avoid dependency issues
  4. Purge PHP 5
  5. Installl PHP 7 and needed dependencies: sudo apt-get install php7.0 php7.0-mysql php7.0-sqlite3 php7.0-pgsql php7.0-gd php7.0-intl php7.0-mcrypt php7.0-curl php7.0-json php7.0-ldap php7.0-cli -y
  6. Extract ownCloud and setup correct permissions

NOTE, NOT TESTED THIS METHOD. But it should work

@enoch85
Copy link
Member

enoch85 commented Dec 23, 2015

@jnweiger Saw that the new 8.2.2 installed php5-cgi separately. Does this mean that the issue is addressed?

@Akhenaton
Copy link

No...
Do an "apt-cache depends owncloud-server" => Still depends PHP5-*** exclusively.
(I don't understand why this simple packaging issue has not been solved with the 8.2.2 release, i don't want to keep two PHP versions on my server)

@MrGraversen
Copy link

Any news on the issue...?

@jospoortvliet
Copy link

@MrGraversen right now, most people who work on this are on holiday. I'm sure there will be attention for this in the new year ;-)

@webmarka
Copy link

webmarka commented Jan 3, 2016

Got it working pretty easily using @enoch85 method on a Linux Mint 17.3 desktop. It's a basic install, I will keep testing with different configs and apps enabled too see if my favourites apps setup still work. If everything is good, next step will be to test it on a Ubuntu 14.04 server :) Yay!

@Akhenaton
Copy link

Look, we all know that it's working well... That's not the matter. The matter is a Linux packaging issue.

@jospoortvliet
Copy link

I believe the packages were updated to not handle dependencies at all... Not sure if that has already been applied fully, but it's a rather dirty solution to this problem.

What's going to happen with the packages is a tad unclear at the moment, we're not happy with the state either.

@Akhenaton
Copy link

I believe the packages were updated to not handle dependencies at all...

No, it hasn't been updated... Perhaps for the next 8.2.3 ?... in March 2016.... pfff

(In fact, i think that they know Owncloud is not fully compatible with PHP7, contrary what it is said. The "Sabre/Dav" part used in core is the culprit.)

see here : https://groups.google.com/forum/#!topic/sabredav-discuss/kHWTl4dT9jo

[quote]
"However, a problem is that we don't actually have a stable sabre/dav release right now that supports PHP 7."[endofquote]

@enoch85
Copy link
Member

enoch85 commented Jan 7, 2016

@Akhenaton Just to be clear - ownCloud works with PHP 7. I've tested it, @jospoortvliet tested it - and I'm sure several others did to. I agree that the dependency issue is bad, but it's going to be solved.

@enoch85
Copy link
Member

enoch85 commented Apr 5, 2016

As this will be released in 9.0.1 I will close this. Feel free to reopen if the issue presists.

@enoch85 enoch85 closed this as completed Apr 5, 2016
@enoch85
Copy link
Member

enoch85 commented Apr 7, 2016

This is still an issue: owncloud-archive/documentation#2222 (comment) cc @jnweiger

@enoch85 enoch85 reopened this Apr 7, 2016
@arjanvlek
Copy link

Hi, I used to have PHP 5.6.x on my server, but now I have PHP 7.0 and want to uninstall PHP 5.6 completely.
However, if I try to remove the PHP 5.6 packages, apt-get wants to uninstall owncloud and owncloud-server from my system. How do I uninstall PHP 5.6 while keeping PHP 7.0 and Owncloud 9.0.1?

The only package I could uninstall was libapache2-mod-php5 so there are at least no duplicate PHP modules for apache2 on my server anymore...

@enoch85
Copy link
Member

enoch85 commented Apr 24, 2016

@arjanvlek Which OS do you run?

@arjanvlek
Copy link

@enoch85 Debian 8.4

@ghost
Copy link

ghost commented Apr 24, 2016

@arjanvlek apt-get install owncloud-deps-php7.0 && apt-get remove --purge owncloud-deps-php5

@enoch85
Copy link
Member

enoch85 commented Apr 24, 2016

@arjanvlek Just mv the config data apps and theme folder outside of your install dir and purge owncloud completely. Then reinstall it and move back the folders.

@RealRancor beat me to it ;)

@arjanvlek
Copy link

Sorry that it is in Dutch but this is what this command gives me:

De volgende pakketten hebben niet-voldane vereisten:
owncloud-deps-php7.0 : Vereisten: php7.0-mbstring maar het is niet installeerbaar
Vereisten: php7.0-xml maar het is niet installeerbaar
Vereisten: php7.0-zip maar het is niet installeerbaar

@enoch85
Copy link
Member

enoch85 commented Apr 24, 2016

@arjanvlek What I wrote works anyway, I just did it on 7 servers myself today.

@arjanvlek
Copy link

It misses some PHP7.0 packages on my server. From which repo did you get php7.0? I used dotDeb

@arjanvlek
Copy link

@enoch85 Oh wow I see the apt-get command wasn't posted by you! Will try the other method and see if it works.

@enoch85
Copy link
Member

enoch85 commented Apr 24, 2016

aptitude purge owncloud* -y
aptitude purge php5* -y
apt-get autoremove -y (I think it's apt-get on Debian)
aptitude install owncloud -y
and if it doesn't install the php 7 dependencies, then just;
aptitude install owncloud-deps-php7 -y

Done.

@arjanvlek
Copy link

apt-get install owncloud immediately wants to install php5 packages again...
and that apt-get purge php5* -y command is dangerous as it also removes PHP7!!!

@enoch85
Copy link
Member

enoch85 commented Apr 24, 2016

@arjanvlek If you know what you are doing you can just install PHP 7 again. Try to do a apt-get autoclean as well, and then restart apache, or the server. Sometimes the servers just don't listen to your commands and you have to force it. ;)

@arjanvlek
Copy link

arjanvlek commented Apr 24, 2016

@enoch85 Yep I installed PHP7.0 and owncloud again. I found out that PHP7 support is incomplete with dotdeb and therefore owncloud-deps-php7 can't be installed due to missing packages. Therefore I'll leave php5 on my server until I find a better php7 repo. Any suggestions for a better php7 repo? Or wait until debian 9 which will include it in its default repos?

Anyway thanks for helping me.

@enoch85
Copy link
Member

enoch85 commented Apr 24, 2016

@arjanvlek
Copy link

arjanvlek commented Apr 24, 2016

@enoch85 I got everything installed back and enabled php7 using this
command:

sudo a2dismod php5 && sudo a2enmod php7.0 && sudo service apache2 restart

The old packages didn't take up that much space and all works fine now.
Also enabled memcache using php7.0-apcu and works great!
Bye

@PVince81
Copy link
Contributor

Is this still an issue ?

@owncloud/packaging

@MrGraversen
Copy link

Personally, I eventually gave up using ownCloud altogether because this issue dragged on for several months. I think it is still an issue.

@arjanvlek
Copy link

I just left the php5 packages on the system and never looked back.
Furthermore, I disabled libapache2-mod-php5 and started using php7 only, both the CLI and Apache2 parts of it.
So: While owncloud 9.1.1 stable still "needs" php5 packages installed on Debian 8.5 32 bit, it is actually using php7 (due to libapache2-mod-php7.0 being turned on) and it is running just fine.

@Vectrex
Copy link

Vectrex commented Oct 11, 2016

It is no longer a problem. For quite some time it was sufficient to install only the owncloud-files package from the official repository. Running it on Ubuntu 14.04.5 for a few months now without any problems.

@crrodriguez
Copy link

@Vectrex thanks for letting us to know.

@arjanvlek
Copy link

I confirm this issue is resolved.
All it took me to switch to the correct dependencies was this one-line command:
sudo apt remove owncloud-deps-php5 && sudo apt install owncloud-deps-php7.0
Afterwards I removed all remaining php5 packages, such as libapache2-mod-php5 and the base php5 packages. Thanks for fixing it :)

@lock
Copy link

lock bot commented Aug 3, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests