# Unable to upgrade FreeBSD 10



## eman de guzman (Feb 24, 2015)

Hello,

I am trying to do an upgrade hoping that it will fix the issue of missing libpng6. However, every time I do a `pkg upgrade` I get this message:

```
Checking integrity... done (19 conflicting)
pkg: Cannot solve problem using SAT solver:
conflict rule: The following packages conflict with each other: php55-zlib-5.5.21(r), php5-zlib-5.4.37(r)
dependency rule: package php55-zlib(r) depends on: php55-zlib(l)moodle27(l)
conflict rule: The following packages conflict with each other: php55-zlib-5.5.21(r), php55-zlib-5.5.21(r)
upgrade rule: upgrade local php55-zlib-5.5.18 to remote php55-zlib-5.5.21
cannot install package php55-zlib, remove it from request? [Y/n]: y
pkg: cannot find php55-zlib in the request
pkg: cannot solve job using SAT solver
Checking integrity... done (0 conflicting)
Conflicts with the existing packages have been found.
One more solver iteration is needed to resolve them.
```
Would somebody happen to know what I need to do to resolve this. I'm not sure what other info needs to be provided so if more info is needed please do tell me what more needs to be posted.

TIA


----------



## woodsb02 (Feb 24, 2015)

Whilst it can be time consuming, forcing a full package upgrade as root may work:
`# pkg upgrade -f`

This might work because of the following UPDATING entry:

```
20141126:
  AFFECTS: users of lang/perl5.*
  AUTHOR: mat@FreeBSD.org

  The directories where Perl modules are installed has changed.  All
  affected ports' PORTREVISION have been bumped, so upgrading should
  be as painless as possible.  The old directories have been kept in
  the default Perl @INC to make it even more painless.

  The default Perl has been switched to lang/perl5.18.  These examples
  are for switching from lang/perl5.16, if you are running a different
  version, replace lang/perl5.16 with the origin of the Perl you have
  installed.

  Binary package users:

    # pkg upgrade -f

  Portupgrade users:
    0) Fix pkgdb.db (for safety):
        pkgdb -Ff

    1) Reinstall new version of Perl (5.18):
        portupgrade -o lang/perl5.18 -f lang/perl5.16

    2) Reinstall everything that depends on Perl:
        portupgrade -fr lang/perl5.18

  Portmaster users:
        portmaster -o lang/perl5.18 lang/perl5.16

        Conservative:
        portmaster p5-

        Comprehensive (but perhaps overkill):
        portmaster -r perl5-

  Note: If the "perl5-" glob matches more than one port you will need to specify
        the name of the installed Perl package explicitly.  You can get its name
        by running: pkg info perl5
```


----------



## eman de guzman (Feb 26, 2015)

Hi woodsb02

I tried your advice and did a force upgrade as root

`# pkg upgrade -f`

But it just kept on looping asking the same thing about php55-zlib.

```
pkg: cannot find php55-zlib in the request
pkg: cannot solve job using SAT solver
Checking integrity... done (0 conflicting)
Your packages are up to date.
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking for upgrades (230 candidates): 100%
Processing candidates (230 candidates): 100%
Checking integrity... done (19 conflicting)
New version of pkg detected; it needs to be installed first.
pkg: Cannot solve problem using SAT solver:
conflict rule: The following packages conflict with each other: php55-zlib-5.5.21(r), php5-zlib-5.4.37(r)
dependency rule: package php55-zlib(r) depends on: php55-zlib(l)moodle27(l)
conflict rule: The following packages conflict with each other: php55-zlib-5.5.21(r), php55-zlib-5.5.21(r)
upgrade rule: upgrade local php55-zlib-5.5.18 to remote php55-zlib-5.5.21
cannot install package php55-zlib, remove it from request? [Y/n]: y
pkg: cannot find php55-zlib in the request
pkg: cannot solve job using SAT solver
Checking integrity... done (0 conflicting)
Your packages are up to date.
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking for upgrades (230 candidates): 100%
Processing candidates (230 candidates): 100%
Checking integrity... done (19 conflicting)
New version of pkg detected; it needs to be installed first.
pkg: Cannot solve problem using SAT solver:
conflict rule: The following packages conflict with each other: php55-zlib-5.5.21(r), php5-zlib-5.4.37(r)
dependency rule: package php55-zlib(r) depends on: php55-zlib(l)moodle27(l)
conflict rule: The following packages conflict with each other: php55-zlib-5.5.21(r), php55-zlib-5.5.21(r)
upgrade rule: upgrade local php55-zlib-5.5.18 to remote php55-zlib-5.5.21
cannot install package php55-zlib, remove it from request? [Y/n]: y
pkg: cannot find php55-zlib in the request
pkg: cannot solve job using SAT solver
Checking integrity... done (0 conflicting)
Your packages are up to date.
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking for upgrades (230 candidates): 100%
Processing candidates (230 candidates): 100%
Checking integrity... done (19 conflicting)
New version of pkg detected; it needs to be installed first.
pkg: Cannot solve problem using SAT solver:
conflict rule: The following packages conflict with each other: php55-zlib-5.5.21(r), php5-zlib-5.4.37(r)
dependency rule: package php55-zlib(r) depends on: php55-zlib(l)moodle27(l)
conflict rule: The following packages conflict with each other: php55-zlib-5.5.21(r), php55-zlib-5.5.21(r)
upgrade rule: upgrade local php55-zlib-5.5.18 to remote php55-zlib-5.5.21
cannot install package php55-zlib, remove it from request? [Y/n]:
```
If you have any other ideas I'll try it.


----------



## free-and-bsd (Mar 1, 2015)

To start from the start: what's that business of the missing libpng6?


----------



## Sixkillers (Mar 2, 2015)

I had experienced the similar problem and I have solved it by manually re-installing php5, namely:

`pkg remove -fy php5 php5-zlib php5-xml php5-session php5-openssl php5-mbstring php5-gd php5-sockets php5-snmp php5-mysql
pkg install -y php5 php5-zlib php5-xml php5-session php5-openssl php5-mbstring php5-gd php5-sockets php5-snmp php5-mysql`
(You might have different set of php5 packages installed)

Then I was able to perform `pkg upgrade`.


----------



## SirDice (Mar 2, 2015)

Looking at the OP, it looks like you had a mix of PHP 5.4 and PHP 5.5 packages. Some of them conflict because they install the same files (but different versions).


----------



## eman de guzman (Mar 18, 2015)

SirDice, I don't think I do. I have the following list:

```
#pkg info | grep php
php55-5.5.18                   PHP Scripting Language
php55-ctype-5.5.18             The ctype shared extension for php
php55-curl-5.5.18              The curl shared extension for php
php55-dom-5.5.18               The dom shared extension for php
php55-extensions-1.8           "meta-port" to install PHP extensions
php55-filter-5.5.18            The filter shared extension for php
php55-ftp-5.5.20               The ftp shared extension for php
php55-gd-5.5.18                The gd shared extension for php
php55-hash-5.5.18              The hash shared extension for php
php55-iconv-5.5.18             The iconv shared extension for php
php55-json-5.5.18              The json shared extension for php
php55-mbstring-5.5.18          The mbstring shared extension for php
php55-mcrypt-5.5.20_1          The mcrypt shared extension for php
php55-mysql-5.5.18             The mysql shared extension for php
php55-mysqli-5.5.18            The mysqli shared extension for php
php55-opcache-5.5.18           The opcache shared extension for php
php55-openssl-5.5.18           The openssl shared extension for php
php55-pcntl-5.5.18             The pcntl shared extension for php
php55-pdo-5.5.18               The pdo shared extension for php
php55-pdo_mysql-5.5.18         The pdo_mysql shared extension for php
php55-pdo_sqlite-5.5.18_1      The pdo_sqlite shared extension for php
php55-phar-5.5.18              The phar shared extension for php
php55-posix-5.5.18             The posix shared extension for php
php55-session-5.5.18           The session shared extension for php
php55-simplexml-5.5.18         The simplexml shared extension for php
php55-soap-5.5.18              The soap shared extension for php
php55-sqlite3-5.5.18_1         The sqlite3 shared extension for php
php55-tokenizer-5.5.18         The tokenizer shared extension for php
php55-xml-5.5.18               The xml shared extension for php
php55-xmlreader-5.5.18         The xmlreader shared extension for php
php55-xmlrpc-5.5.18            The xmlrpc shared extension for php
php55-xmlwriter-5.5.18         The xmlwriter shared extension for php
php55-zip-5.5.18               The zip shared extension for php
php55-zlib-5.5.18              The zlib shared extension for php
```
Sixkillers, I would like to try that but I'm afraid I might break the box. I did that to one of our servers, removing the file mentioned in the error, and as a result I can't log in to it anymore. The current box I have right now is being used for other purposes so I kinda careful not to break it. I'll let you know once I get to try it.


----------



## junovitch@ (Mar 19, 2015)

What does `pkg query -e '%a = 1' %o | grep php` (automatically installed packages) and `pkg query -e '%a = 0' %o | grep php` (non-automatically installed packages) return?  I'm curious if something doesn't match up to reality with what should be installed.


----------



## eman de guzman (Mar 19, 2015)

Sixkillers, looks like that worked.


----------

