# Resolving apache conflict



## darthnul (Aug 13, 2014)

I installed the new version of pkg(8) last night and tried to do a `pkg upgrade`. This fails due to a conflict with Apache. It seems pkg(8) wants to do both a new install of apache24, and an upgrade to apache22. `pkg upgrade` output (below) advises that "One more solver iteration is needed to resolve", or it needs to be resolved manually.

How would I go about doing "One more solver iteration"? If I need to resolve manually, how do I determine why pkg(8) wants to do a new install of apache24? I know there's a security issue with my current apache22 version but I'm assuming that's what the apache22 upgrade is for.


```
Updating repository catalogue
FreeBSD repository is up-to-date
All repositories are up-to-date
New version of pkg detected; it needs to be installed first.
The following 1 packages will be affected (of 0 checked):

Installed packages to be UPGRADED:
        pkg: 1.3.5.1 -> 1.3.6

The process will require 256 kB more space
2 MB to be downloaded

Proceed with this action [y/N]: y
Fetching pkg-1.3.6.txz: 100% of 2 MB
Checking integrity... done (0 conflicting)
[1/1] Upgrading pkg from 1.3.5.1 to 1.3.6: 100%
Updating repository catalogue
FreeBSD repository is up-to-date
All repositories are up-to-date
Checking for upgrades: 6%
pkg: gio-fam-backend has a missing dependency: python26

pkg: mplayerxp has a missing dependency: win32-codecs
Checking for upgrades: 100%
The following 44 packages will be affected (of 0 checked):

New packages to be INSTALLED:
        readline: 6.3.6_1
        indexinfo: 0.2
        apache24: 2.4.10

Installed packages to be UPGRADED:
        xproto: 7.0.25 -> 7.0.26
        tiff: 4.0.3_2 -> 4.0.3_4
        libXi: 1.7.2_2,1 -> 1.7.4,1
        expat: 2.1.0 -> 2.1.0_1
        libgd: 2.1.0_3,1 -> 2.1.0_4,1
        nagios: 3.5.1_5 -> 3.5.1_6
        nagios-plugins: 2.0.2,1 -> 2.0.3_1,1
        perl5: 5.16.3_10 -> 5.16.3_11
        pcre: 8.34_1 -> 8.34_2
        ruby: 1.9.3.484_2,1 -> 1.9.3.547,1
        portupgrade: 2.4.12_1,2 -> 2.4.12_2,2
        clamav: 0.98.3_5 -> 0.98.4_1
        curl: 7.37.0 -> 7.37.1_2
        ca_root_nss: 3.16 -> 3.16.3
        php5: 5.4.29 -> 5.4.31
        mod_php5: 5.4.29,1 -> 5.4.31,1
        apache22: 2.2.27_2 -> 2.2.27_6
        apr: 1.5.1.1.5.3 -> 1.5.1.1.5.3_3
        gdbm: 1.11 -> 1.11_2
        libICE: 1.0.8_2,1 -> 1.0.9,1
        inputproto: 2.3 -> 2.3.1
        python27: 2.7.6_4 -> 2.7.8_2
        bash: 4.3.18_2 -> 4.3.22
        pciids: 20140526 -> 20140718
        libdrm: 2.4.17_1 -> 2.4.17_1,1
        libpthread-stubs: 0.3_4 -> 0.3_5
        jbigkit: 1.6 -> 2.1_1
        db48: 4.8.30.0 -> 4.8.30.0_2
        p5-Date-Manip: 6.43 -> 6.46
        isc-dhcp42-server: 4.2.6_1 -> 4.2.6_2
        en-freebsd-doc: 44807,1 -> 45106_1,1
        cvsup-without-gui: 16.1h_4 -> 16.1h_7

Installed packages to be REINSTALLED:
        libxcb-1.10_2 (options changed)
        fontconfig-2.11.0_3,1 (options changed)
        amanda-client-3.3.2_1,1 (direct dependency changed)
        amanda-server-3.3.2_1,1 (direct dependency changed)
        arc-5.21p (options changed)
        freeglut-2.8.1_2 (options changed)
        m4-1.4.17_1,1 (options changed)
        db42-4.2.52_5 (needed shared library changed)
        radiusd-cistron-1.6.8_2 (options changed)

The process will require 17 MB more space
101 MB to be downloaded

Proceed with this action [y/N]: y
Fetching xproto-7.0.26.txz: 100% of 59 kB
Fetching tiff-4.0.3_4.txz: 100% of 817 kB
Fetching libXi-1.7.4,1.txz: 100% of 121 kB
Fetching libxcb-1.10_2.txz: 100% of 972 kB
Fetching expat-2.1.0_1.txz: 100% of 113 kB
Fetching fontconfig-2.11.0_3,1.txz: 100% of 333 kB
Fetching libgd-2.1.0_4,1.txz: 100% of 199 kB
Fetching nagios-3.5.1_6.txz: 100% of 870 kB
Fetching nagios-plugins-2.0.3_1,1.txz: 100% of 317 kB
Fetching perl5-5.16.3_11.txz: 100% of 12 MB
Fetching amanda-client-3.3.2_1,1.txz: 100% of 1 MB
Fetching pcre-8.34_2.txz: 100% of 1 MB
Fetching amanda-server-3.3.2_1,1.txz: 100% of 679 kB
Fetching ruby-1.9.3.547,1.txz: 100% of 3 MB
Fetching portupgrade-2.4.12_2,2.txz: 100% of 93 kB
Fetching readline-6.3.6_1.txz: 100% of 295 kB
Fetching indexinfo-0.2.txz: 100% of 6 kB
Fetching clamav-0.98.4_1.txz: 100% of 3 MB
Fetching curl-7.37.1_2.txz: 100% of 1 MB
Fetching ca_root_nss-3.16.3.txz: 100% of 315 kB
Fetching arc-5.21p.txz: 100% of 47 kB
Fetching php5-5.4.31.txz: 100% of 1 MB
Fetching mod_php5-5.4.31,1.txz: 100% of 920 kB
Fetching apache22-2.2.27_6.txz: 100% of 2 MB
Fetching apr-1.5.1.1.5.3_3.txz: 100% of 403 kB
Fetching gdbm-1.11_2.txz: 100% of 141 kB
Fetching freeglut-2.8.1_2.txz: 100% of 177 kB
Fetching libICE-1.0.9,1.txz: 100% of 92 kB
Fetching inputproto-2.3.1.txz: 100% of 15 kB
Fetching python27-2.7.8_2.txz: 100% of 8 MB
Fetching bash-4.3.22.txz: 100% of 1 MB
Fetching pciids-20140718.txz: 100% of 181 kB
Fetching libdrm-2.4.17_1,1.txz: 100% of 102 kB
Fetching libpthread-stubs-0.3_5.txz: 100% of 4 kB
Fetching jbigkit-2.1_1.txz: 100% of 70 kB
Fetching db48-4.8.30.0_2.txz: 100% of 1 MB
Fetching m4-1.4.17_1,1.txz: 100% of 180 kB
Fetching db42-4.2.52_5.txz: 100% of 1 MB
Fetching apache24-2.4.10.txz: 100% of 3 MB
Fetching p5-Date-Manip-6.46.txz: 100% of 898 kB
Fetching radiusd-cistron-1.6.8_2.txz: 100% of 122 kB
Fetching isc-dhcp42-server-4.2.6_2.txz: 100% of 890 kB
Fetching en-freebsd-doc-45106_1,1.txz: 100% of 48 MB
Fetching cvsup-without-gui-16.1h_7.txz: 100% of 394 kB
Checking integrity... done (1 conflicting)
pkg: cannot resolve conflict between remote apache22(want install), remote apache24(want install), please resolve it manually
pkg: SAT: conflicting request, cannot solve
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.
```


----------



## SirDice (Aug 13, 2014)

Please read /usr/ports/UPDATING entry 20140713:

```
20140713:
  AFFECTS: users of www/apache22
  AUTHOR: ohauer@FreeBSD.org

  The default version was changed from www/apache22 to www/apache24,
  pre-build apache modules and web applications will also reflect this!

  In case ports are build by yourself and apache22 is required
  use the following command to keep apache22 as default.

  # echo "DEFAULT_VERSIONS+=apache=2.2" >> /etc/make.conf
```

In your case you may need to remove apache22 to allow apache24 to install.


----------



## kpa (Aug 13, 2014)

First of all, delete gio-fam-backend, it was removed from ports quite a while ago. Next you can upgrade most of the other packages than the Apache ones by using pkg upgrade with the package name as the argument, start with the perl and python ones because they are the ones with most dependents. Go over the rest one by one until you start getting nothing but conflict errors. For example:

`pkg upgrade python27`


----------

