1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Reinstall Perl

Discussion in 'Installation and Maintenance of Ports or Packages' started by Majorix, Aug 28, 2012.

  1. Majorix

    Majorix New Member

    Messages:
    149
    Thanks Received:
    5
    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.
     
  2. chatwizrd

    chatwizrd Member

    Messages:
    205
    Thanks Received:
    22
    You could use -f flag with pkg_delete to force it too.
     
  3. Majorix

    Majorix New Member

    Messages:
    149
    Thanks Received:
    5
    Tried that before posting, sorry for not mentioning it. However that did not do it either.
     
  4. Beeblebrox

    Beeblebrox Member

    Messages:
    908
    Thanks Received:
    113
    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.
     
    Majorix and zeissoctopus thanked for this.
  5. Majorix

    Majorix New Member

    Messages:
    149
    Thanks Received:
    5
    Thanks a lot for the help. My problem resolved when I installed a p5-* library, don't remember which.