# pkg upgrade issues



## strandbal (Feb 15, 2014)

I have a somewhat slow server which is used for simple NAS tasks. It contains an Atom 330 CPU, so compiling everything from ports is taking forever on this machine. Therefore I decided since I upgraded it to FreeBSD 10 that I want to use packages as much as possible.

I need PHP with the Apache module enabled however, so I installed just that from ports.

Whenever I run `pkg upgrade` now, it wants to reinstall PHP since the options are changed:


```
Upgrading ca_root_nss: 3.15.3.1 -> 3.15.4
        Upgrading curl: 7.33.0_2 -> 7.34.0
        Reinstalling libXext-1.3.2,1 (direct dependency changed)
        Reinstalling libXp-1.0.2,1 (direct dependency changed)
        Reinstalling libXt-1.1.4,1 (direct dependency changed)
        Reinstalling nano-2.2.6 (options changed)
        Reinstalling nettle-2.7.1 (options changed)
        Upgrading p5-Error: 0.17021 -> 0.17022
        Upgrading pcre: 8.33 -> 8.34
        Reinstalling php55-5.5.9 (options changed)
        Reinstalling php55-extensions-1.8 (options changed)
        Reinstalling samba-nsupdate-9.8.6 (options changed)
        Reinstalling sqlite3-3.8.3 (options changed)
        Reinstalling libXmu-1.1.2,1 (direct dependency changed)
        Reinstalling libXpm-3.5.11 (direct dependency changed)
        Reinstalling libXaw-1.0.12,2 (direct dependency changed)
        Reinstalling t1lib-5.1.2_2,1 (direct dependency changed)
        Reinstalling php55-gd-5.5.9 (direct dependency changed)
```

How can I properly mix these ports and packages? Is there a way I can tell `pkg upgrade` to leave packages php55 and php55-extensions alone?


----------



## Juanitou (Feb 15, 2014)

You can use `pkg lock` for that.


----------



## strandbal (Feb 15, 2014)

Thanks for the quick response!

Is this the correct way to mix ports with packages? Can I upgrade php55 and php55-extensions using portmaster without breaking anything?


----------



## Juanitou (Feb 15, 2014)

I have never updated a locked package, I don’t even know if you have to `pkg unlock` it before using portmaster (I guess yes) but as long as you don’t add packages depending on other PHP versions it should work. Don’t take my word for granted!


----------

