# Getting an error while installing Perl5.32 on freebsd 13



## dpalme (Apr 21, 2022)

I have never had a problem setting up perl in the past but it is throwing an error while installing:

unknown keyword postexec: @postexec

I have tried to reset the config and reinstall but I get the same error.

This is a new install on a new box.


----------



## Alain De Vos (Apr 22, 2022)

what's the output of :

```
freebsd-version -kru
pkg info | grep ^perl
pkg search perl | grep ^perl
```


----------



## dpalme (Apr 22, 2022)

I am not sure what the deal was maybe a glitch when it was pulling the ports, but I was able to update the ports collection and that took care of the issue.  Thanks for the response Alain.


----------



## skunk (Apr 22, 2022)

It is a bug due to changes in `pkg` 1.17.
The ports collection, when installed from the installation media, is dysfunctional, as `pkg` fails to install stuff from that.
You need to delete/usr/src and recreate it, for example using `portsnap`.


----------



## SirDice (Apr 22, 2022)

skunk said:


> The ports collection, when installed from the installation media, is dysfunctional, as `pkg` fails to install stuff from that.


pkg(8) doesn't use the ports tree, at all.



skunk said:


> You need to delete/usr/src and recreate it, for example using `portsnap`.


Ehm, don't you mean /usr/ports? portsnap(8) doesn't do anything with the _source_ tree.


----------



## skunk (Apr 22, 2022)

SirDice said:


> pkg(8) doesn't use the ports tree, at all.


Except when it gets to install a package built using ports.
E.g. `make install` breaks with pkg complaining of unknown keywords.
Then, if you use the 13.0-RELEASE installation image's ports tree install option _without_ updating the ports tree afterwards, with some ports you'll get a lot of errors, if these use keywords that have been removed with pkg 1.17 (see also the Porters' Handbook, these keywords are marked there for deprecation/removal).
I have searched for my original PR, which I closed after I found out that removing the ports tree and reinstalling it with `portsnap` fixes the problem, but don't find it right now.



SirDice said:


> Ehm, don't you mean /usr/ports? portsnap(8) doesn't do anything with the _source_ tree.


Oops yes. I am very distracted these days, difficult to concentrate.


----------

