Apache, MySQL and PHP7x inside Jail.

Status
Not open for further replies.

Ismael Duarte

Contributor
Joined
Jun 13, 2011
Messages
154
Hi All, best wishes for the new year.
I've successfully installed Apache, MySQL and PHP7x inside an iocage jail. But, even tried several times, something wierd happens when I update packages with 'pkg upgrade'.
After all is installed, I run 'pkg upgrade' and get this
Code:
root@Apache:~ # pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (115 candidates): 100%
Processing candidates (115 candidates): 100%
The following 12 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
		openldap-client: 2.4.45
		php56: 5.6.32_1
		php56-gd: 5.6.32_1
		t1lib: 5.1.2_4,1
		libXaw: 1.0.13,2
		printproto: 1.0.5
		libXp: 1.0.3,1
		libXmu: 1.1.2_3,1

Installed packages to be REINSTALLED:
		php71-ldap-7.1.12_2 (direct dependency changed: openldap-client)
		php71-extensions-1.0 (options changed)
		pecl-pdflib-4.1.2 (direct dependency changed: php56)
		dialog4ports-0.1.6 (option removed: BUCKETEER)

Number of packages to be installed: 8
Number of packages to be reinstalled: 4

The process will require 33 MiB more space.
6 MiB to be downloaded.

Proceed with this action? [y/N]:


As you can see, pkg asks to install PHP56.
If I accept the upgrade, everything is ok. No errors.

Code:
Proceed with this action? [y/N]: y
[Apache] [1/12] Fetching php71-ldap-7.1.12_2.txz: 100%   20 KiB  20.9kB/s	00:01	
[Apache] [2/12] Fetching php71-extensions-1.0.txz: 100%	1 KiB   1.1kB/s	00:01	
[Apache] [3/12] Fetching pecl-pdflib-4.1.2.txz: 100%   29 KiB  29.3kB/s	00:01	
[Apache] [4/12] Fetching dialog4ports-0.1.6.txz: 100%   11 KiB  11.5kB/s	00:01	
[Apache] [5/12] Fetching openldap-client-2.4.45.txz: 100%	1 MiB   1.1MB/s	00:01	
[Apache] [6/12] Fetching php56-5.6.32_1.txz: 100%	3 MiB   3.1MB/s	00:01	
[Apache] [7/12] Fetching php56-gd-5.6.32_1.txz: 100%  134 KiB 137.7kB/s	00:01	
[Apache] [8/12] Fetching t1lib-5.1.2_4,1.txz: 100%  754 KiB 772.4kB/s	00:01	
[Apache] [9/12] Fetching libXaw-1.0.13,2.txz: 100%  450 KiB 460.3kB/s	00:01	
[Apache] [10/12] Fetching printproto-1.0.5.txz: 100%   14 KiB  14.2kB/s	00:01	
[Apache] [11/12] Fetching libXp-1.0.3,1.txz: 100%   83 KiB  84.9kB/s	00:01	
[Apache] [12/12] Fetching libXmu-1.1.2_3,1.txz: 100%   98 KiB 100.2kB/s	00:01	
Checking integrity... done (3 conflicting)
  - openldap-client-2.4.45 conflicts with openldap-sasl-client-2.4.45 on /usr/local/bin/ldapadd
  - php56-5.6.32_1 conflicts with php71-7.1.12_2 on /usr/local/bin/php
  - php56-gd-5.6.32_1 conflicts with php71-gd-7.1.12_2 on /usr/local/include/php/ext/gd/gdcache.h
Cannot solve problem using SAT solver, trying another plan
Checking integrity... done (0 conflicting)
Conflicts with the existing packages have been found.
One more solver iteration is needed to resolve them.
The following 6 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
		openldap-client: 2.4.45

Installed packages to be REINSTALLED:
		php71-ldap-7.1.12_2 (direct dependency changed: openldap-client)
		php71-extensions-1.0 (options changed)
		dialog4ports-0.1.6 (option removed: BUCKETEER)

Number of packages to be installed: 1
Number of packages to be reinstalled: 3

The process will require 6 MiB more space.

Proceed with this action? [y/N]


With this second I've an errors solved removing the conflict package
Code:
Proceed with this action? [y/N]: y
[Apache] Fetching openldap-sasl-client-2.4.45.txz: 100%	1 MiB   1.1MB/s	00:01	
[Apache] [1/6] Deinstalling openldap-sasl-client-2.4.45...
[Apache] [1/6] Deleting files for openldap-sasl-client-2.4.45: 100%
[Apache] [2/6] Installing openldap-client-2.4.45...
[Apache] [2/6] Extracting openldap-client-2.4.45: 100%
[Apache] [2/6] Installing openldap-sasl-client-2.4.45...
pkg: openldap-sasl-client-2.4.45 conflicts with openldap-client-2.4.45 (installs files into the same place).  Problematic file: /usr/local/bin/ldapadd
root@Apache:~ # pkg remove openldap-client-2.4.45
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
		openldap-client-2.4.45

Number of packages to be removed: 1

The operation will free 6 MiB.

Proceed with deinstalling packages? [y/N]: y
[Apache] [1/1] Deinstalling openldap-client-2.4.45...
[Apache] [1/1] Deleting files for openldap-client-2.4.45: 100%
root@Apache:~ # pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (114 candidates): 100%
Processing candidates (114 candidates): 100%
Checking integrity... done (2 conflicting)
  - php56-5.6.32_1 conflicts with php71-7.1.12_2 on /usr/local/bin/php
  - php56-gd-5.6.32_1 conflicts with php71-gd-7.1.12_2 on /usr/local/include/php/ext/gd/gdcache.h
Cannot solve problem using SAT solver, trying another plan
Checking integrity... done (0 conflicting)
The following 4 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
		openldap-client: 2.4.45

Installed packages to be REINSTALLED:
		php71-ldap-7.1.12_2 (direct dependency changed: openldap-client)
		php71-extensions-1.0 (options changed)
		dialog4ports-0.1.6 (option removed: BUCKETEER)

Number of packages to be installed: 1
Number of packages to be reinstalled: 3

The process will require 6 MiB more space.

Proceed with this action? [y/N]: y
[Apache] [1/4] Installing openldap-client-2.4.45...
[Apache] [1/4] Extracting openldap-client-2.4.45: 100%
[Apache] [2/4] Reinstalling php71-ldap-7.1.12_2...
[Apache] [2/4] Extracting php71-ldap-7.1.12_2: 100%
[Apache] [3/4] Reinstalling php71-extensions-1.0...
[Apache] [4/4] Reinstalling dialog4ports-0.1.6...
[Apache] [4/4] Extracting dialog4ports-0.1.6: 100%
Message from openldap-client-2.4.45:

************************************************************

The OpenLDAP client package has been successfully installed.

Edit
  /usr/local/etc/openldap/ldap.conf
to change the system-wide client defaults.

Try `man ldap.conf' and visit the OpenLDAP FAQ-O-Matic at
  http://www.OpenLDAP.org/faq/index.cgi?file=3
for more information.

************************************************************


Everything OK 'till here!

Now, the problem is when I try to 'pkg upgrade' again, php71 extensions are removed if I answer Yes
Code:
root@Apache:~ # pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (111 candidates): 100%
Processing candidates (111 candidates): 100%
Checking integrity... done (2 conflicting)
  - php56-5.6.32_1 conflicts with php71-7.1.12_2 on /usr/local/bin/php
  - php56-gd-5.6.32_1 conflicts with php71-gd-7.1.12_2 on /usr/local/include/php/ext/gd/gdcache.h
Checking integrity... done (0 conflicting)
The following 42 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
		php71-zlib-7.1.12_2
		php71-zip-7.1.12_2
		php71-xmlwriter-7.1.12_2
		php71-xmlreader-7.1.12_2
		php71-xml-7.1.12_2
		php71-tokenizer-7.1.12_2
		php71-sqlite3-7.1.12_2
		php71-simplexml-7.1.12_2
		php71-session-7.1.12_2
		php71-posix-7.1.12_2
		php71-phar-7.1.12_2
		php71-pdo_sqlite-7.1.12_2
		php71-pdo-7.1.12_2
		php71-opcache-7.1.12_2
		php71-mysqli-7.1.12_2
		php71-mcrypt-7.1.12_2
		php71-mbstring-7.1.12_2
		php71-json-7.1.12_2
		php71-iconv-7.1.12_2
		php71-hash-7.1.12_2
		php71-gd-7.1.12_2
		php71-ftp-7.1.12_2
		php71-filter-7.1.12_2
		php71-fileinfo-7.1.12_2
		php71-exif-7.1.12_2
		php71-dom-7.1.12_2
		php71-curl-7.1.12_2
		php71-ctype-7.1.12_2
		php71-calendar-7.1.12_2
		php71-bz2-7.1.12_2
		php71-bcmath-7.1.12_2
		php71-7.1.12_2
		php71-ldap-7.1.12_2
		php71-extensions-1.0

New packages to be INSTALLED:
		php56: 5.6.32_1
		php56-gd: 5.6.32_1
		t1lib: 5.1.2_4,1
		libXaw: 1.0.13,2
		printproto: 1.0.5
		libXp: 1.0.3,1
		libXmu: 1.1.2_3,1

Installed packages to be REINSTALLED:
		pecl-pdflib-4.1.2 (direct dependency changed: php56)

Number of packages to be removed: 34
Number of packages to be installed: 7
Number of packages to be reinstalled: 1

The operation will free 5 MiB.

Proceed with this action? [y/N]: 


Sorry for the very long post, but ... can't find a solution for this.
Also, don't know if a FreeBSD bug, a Freenas bug or ... a user (me) bug

Thank you for the support.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
It's not a bug, something you have installed has it's dependencies linked to php56. You'll have to figure out what that is and most likely install it from ports with the options of your choosing.
 

Ismael Duarte

Contributor
Joined
Jun 13, 2011
Messages
154
I've created this jail just to test this.
I've installed only Apache 2.4, Mysql 57 and PHP71
everything was installed from ports
 
Last edited:

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
And when you run pkg upgrade it re installs the package version of the software you installed from ports which changes dependencies.

If you installed from ports why are you using pkg to update them? Use one or the other not both.
 

Ismael Duarte

Contributor
Joined
Jun 13, 2011
Messages
154
Now I'm confuse :eek:
I've always did that way, maybe I shouldn't
So, how to update installed packages?!;)
 
Status
Not open for further replies.
Top