Resolving "The lang/perl5.24 port has been deleted: Has expired" portmaster error
While deploying a port upgrade this afternoon, I ran into a problem that I knew was coming eventually. FreeBSD's daily run output has been warning me for months that Perl 5.24 would be reaching end-of-life, and it just happened. It turns out that
perl5.24's expiration date was May 9th 2019, so
portmaster bombed out while working on a port with a dependency on Perl:
The lang/perl5.24 port has been deleted: Has expired
portmaster helpfully (?) installed a newer-but-not-newest version of Perl, 5.26.3, but something about it didn't "stick." Running
perl -v showed the 5.24 version remained in place, and
portmaster itself was still unable to upgrade any ports with a dependency on Perl. After some digging in the ports collection's UPDATING docs, here are the steps I took to get Perl back in proper working order (and upgraded to the latest stable, 5.28).
/etc/make.conf and append the following line:
Next, figure out which versions of Perl are installed on the system. You may only have 5.24, but I also had 5.26 from
portmaster's attempt at self-recovery. Run
pkg info to see what's there:
[root@host ~]# pkg info | grep 'Practical Extraction' perl5-5.24.4_2 Practical Extraction and Report Language perl5.26-5.26.3 Practical Extraction and Report Language
For each of the currently installed versions, run
portmaster with options to repoint the old port's origin at the latest version of Perl, 5.28. Again, you may only need to do this for Perl 5.24, I just happened to have two versions installed.
[root@host ~]# portmaster -o lang/perl5.28 lang/perl5.24 [root@host ~]# portmaster -o lang/perl5.28 lang/perl5.26
/etc/make.conf and remove the line you added in the first step.
Finally, rebuild all of the ports that had previously been built against Perl 5.24.
[root@host ~]# portmaster -f `pkg shlib -qR libperl.so.5.24`
You may have to re-run this a few times, in case there are some circular dependencies that don't resolve themselves on the first run. I also encountered a quirk in that
p5-Locale-libintl suddenly complained that
libintl.h was missing; for some reason it appears to be looking in the wrong place. A quick symlink fixed this for me:
[root@host ~]# ln -s /usr/local/include/libintl.h /usr/include/libintl.h
portmaster rebuild went off without a hitch. Now I have no remaining ports built against the old Perl 5.24, and Perl 5.28 is the only version on the system:
[root@host ~]# pkg shlib -qR libperl.so.5.24 [root@host ~]# pkg info | grep 'Practical Extraction' perl5-5.28.2 Practical Extraction and Report Language