# PKGNG Issue With Perl



## Ryan2012 (Apr 26, 2014)

For some strange reason no matter what I do, PKGNG keeps wanting to install perl5.16.


```
# pkg install -Rf lang/perl5.14
Updating repository catalogue
pkg: warning: database version 22 is newer than libpkg(3) version 21, but still compatible
The following 286 packages will be installed:

	Reinstalling perl5.14-5.14.4_6
	Installing perl5: 5.16.3_9
----snip----
```


```
# cat /etc/make.conf
CPUTYPE?=native
DIALOG="/usr/ports/Tools/scripts/dialogwrapper.sh"   # see http://forums.freebsd.org/showthread.php?t=34536
DISABLE_VULNERABILITIES=yes
FORCE_PKG_REGISTER=yes
IPFW2=TRUE
KERNCONF=TIHS
MAKE_JOBS_NUMBER?=8
RANDOMIZE_MASTER_SITES=yes
DEFAULT_VERSIONS=ruby=1.9
DEFAULT_VERSIONS=perl=5.14
PERL_DEFAULT_VER=5.14
TOP_TABLE_SIZE=211
OPTIONS_SET=CARES
OPTIONS_SET=IPV6
OPTIONS_UNSET=X11
OPTIONS_SET=PKGNG
WITH_PKGNG="YES"
SKIP_DNS_CHECK="YES"
NO_WARNING_PKG_INSTALL_EOL=yes
BATCH=YES
WITHOUT_X11=YES
SKIP_DNS_CHECK=YES
CRYPT_DES=0
WITH_PORT_REPLACES_BASE_BIND8=YES
WITH_PORT_REPLACES_BASE_BIND9=YES
WITH_OPENSSL_PORT=YES
X11BASE=${LOCALBASE}
```


----------



## trh411 (Apr 26, 2014)

My guess is that at least one of the 228 packages to be installed requires lang/perl5.16. It would be easy enough to verify by looking at the run dependencies for the packages to be installed. lang/perl5.16 has been the default since 20140214.

EDIT: One more point, /etc/make.conf is used when you build (i.e., make(1)) a port from source. It is not used by pkg(8).


----------



## Ryan2012 (Apr 27, 2014)

Ahh, that makes sense...

I can't find the package that is requesting perl5.16, I have cpanel on two FreeBSD servers and the last version of cPanel that works with FreeBSD is not compatible with perl5.16 or higher.


I was not aware make.conf does not apply to make.conf, does anyone know of a way to force pkgng to only install perl5.14?


----------



## junovitch@ (Apr 27, 2014)

The default version of Perl in the public repos is 5.16.  Any ports that need Perl will have that as a requirement.  If you absolutely must use an older version for your application you will have to compile from ports so that your /etc/make.conf setting is used.  Once you do that on one machine, you can then use `pkg create -a` and `pkg repo` to create a repository you can share to your other machine(s).  Alternately, you can use ports-mgmt/poudriere if you have several systems you maintain to build packages for them all at once.


----------



## kpa (Apr 27, 2014)

This will hopefully change with the next 1.3 version of ports-mgmt/pkg that will have a new more powerful mechanism of expressing requirements and solving the dependencies based on those requirements. Instead of strictly requiring perl version 5.16 a package can require perl with version higher than 5.12 (for example) and an installed perl version 5.18 would satisfy that.


----------

