Reinstall Perl

Recently while building updates it comes to a point where it fails finding some perl libraries. So I thought I should re-install perl. When I type # pkg_delete 'perl*' though, it states that there are ports depending on perl (which is quite natural btw) and doesn't remove the port.

I am new to FreeBSD and don't know what can be done at this point. Please help!

EDIT:
Just ran # portmaster -f lang/perl5.16
It seems to be compiling right now. Will let you guys how it goes.
 
chatwizrd said:
You could use -f flag with pkg_delete to force it too.

Tried that before posting, sorry for not mentioning it. However that did not do it either.
 
Apart from the main perl port, there are also perl modules which start with p5-. Re-building only perl will not solve the problem if the problem is caused by one of the modules. Sometimes during upgrading, ports do fail to install correctly - it happens to me a lot, so you just re-build. If you are curious, you can see all perl modules installed on your system with:
$ ls -d /var/db/pkg/p5-*
First check for any inconsistency in your ports/package structure, then re-build all perl dependent ports:
# portmaster --check-port-dbdir
Be carefl when deleting ports that are supposedly in the ports db (in folder /var/db/ports). For some reason, there can be packages that fail to register themselves correctly. Look in /var/db/pkg for the port you are about to delete to make sure there is no folder / directory by similar name in there. If there is, the check report is a false one and you should not delete.
Conservative
# portmaster p5-
Or comprehensive (but perhaps overkill)
# portmaster -r perl-

Deleting a port is always possible by below:
# make deinstall -C /usr/ports/lang/perl5.12
The C flag removes the need to cd all the way down to the actual folder. I use perl5.16, no problems.

You can also give these 2 tools a try: ports-mgmt/bpm and ports-mgmt/bxpkg. Not for the install / deinstall but as a tool to search through all ports fitting a given name or description.
 
Thanks a lot for the help. My problem resolved when I installed a p5-* library, don't remember which.
 
Back
Top