# Can't upgrade Perl: perl5-5.16.3_2 conflicts with p5-JSON-PP-2.27203



## mariourk (Oct 28, 2013)

When I try to upgrade to perl-5.16, I run into this error

```
Installing perl5-5.16.3_2...pkg-static: perl5-5.16.3_2 conflicts with p5-JSON-PP-2.27203 (installs files into the same place).  Problematic file: /usr/local/bin/json_pp
```
I tried to uninstall p5-JSON-PP, but that still has several dependencies.

```
pkg: Error while trying to delete packages, dependencies that are still required:
converters/p5-JSON-PP: devel/p5-Parse-CPAN-Meta, devel/p5-Module-Build, devel/p5-CPAN-Meta
```
How should I fix this? :\


----------



## ShelLuser (Oct 28, 2013)

What is it exactly you're doing here? Are you upgrading from a previous version of Perl 5.16 or are you in the process of moving from the previous default version (5.14) to the current one (5.16)?

Is it possible that you recently upgraded Perl without following the instructions in /usr/ports/UPDATING?


----------



## mariourk (Oct 28, 2013)

As far as I can see, I'm running perl-5.12

```
[root@eddard ~]# pkg version -v | grep perl                    
perl-5.12.5_1                      =   up-to-date with port
```
So, I'm trying to upgrade this to 5.16, following the instructions in /usr/ports/UPDATING

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

    1) Reinstall new version of Perl (5.16):
	portupgrade -o lang/perl5.16 -f perl-5.14.\*

    2) Reinstall everything that depends on Perl:
	portupgrade -fr perl
```
I did run `portupgrade -o lang/perl5.16 -f perl-5.12.\*`, because I'm not running perl-5.14, but perl-5.12. Not sure if I was supposed to do that :\


----------



## ShelLuser (Oct 28, 2013)

Ah yes, that clears things up a bit.

Now, I don't have much experience with ports-mgmt/portupgrade but more so with ports-mgmt/portmaster. That preference is based on both personal experience but also by coming across messages such as yours. I'm not blaming portupgrade here, but I do suggest to consider a switch.

Alas, for starters it would be interesting to show us the output of `pkg info -x perl`, just to make sure that no major slip up happened. Assuming only one version of Perl is shown I'd start by checking the current state of your port dependencies, like so: `# portmaster --check-depends`. If portupgrade has a similar function then use that, I'm merely writing up that which I know.

My guess is that something is amiss there which needs to be (manually) fixed.


----------



## wblock@ (Oct 29, 2013)

Why not force-deinstall the problem package and let the upgrade reinstall it?


----------



## mariourk (Oct 29, 2013)

I tried portmaster, but that ran into the same problem. So I force deleted converters/p5-JSON-PP. I also had to delete archivers/p5-IO-Compress, but no force was needed this time. After that neither portmaster nor portupgrade could perform an upgrade anymore. I don't know why. So, I went to /usr/ports/lang/perl5.16 and ran `make install clean` from there. That seemed to work just fine.

`portupgrade -fr perl` did't rebuild anything though. I hope this didn't mess up anything. Is there a way to force rebuilding all the Perl dependencies anyway?


----------



## wblock@ (Oct 29, 2013)

portmaster versions of the commands are shown in /usr/ports/UPDATING, entry 20131023.


----------



## mariourk (Oct 29, 2013)

I tried both the portupgrade and the portmaster method. But both didn't rebuild any perl modules. Obviously, various ports (like amavisd-new) didn't like this. To fix this I manually rebuild all the installed p5 ports with `portmaster -r p5-portname`. I know this is probably a stupid solution that I could have handled better. But I didn't know how and had to get things going again. As far as I can tell, everything works fine now.


----------

