5/15/11

How to Reinstall FreeBSD Ports

FreeBSD is a free, open-source UNIX-like operating system. FreeBSD installs software through the ports system, which is a collection of directories on the system. System administrators navigate to the directories in the command line and issue the software-install command, at which point the ports system automatically downloads the port's source code, compiles and installs it on the system. If a port's installed files have become deleted, modified or corrupted and you want to revert to the original files that came with the port, you can reinstall it. FreeBSD lacks a direct reinstall command, but you can accomplish this by uninstalling the port and reinstalling it.
    • 1

      Open a terminal window by clicking "Applications," "Accessories" and "Terminal" if you're using a graphical desktop environment.

    • 2

      Log in as the root user by typing "su" onto the terminal window, pressing "Enter," typing your root password when prompted and pressing "Enter."

    • 3

      Remove an installed port by typing "pkg_delete lsof-4.57" into the terminal window, replacing "lsof-4.57" with the port's name and pressing "Enter."

    • 4

      Change to the port's directory by typing "cd /usr/ports/sysutils/lsof" into the terminal window, replacing "sysutils/lsof" with the directory of the desired port and pressing "Enter."

    • 5

      Reinstall the port by typing "make install clean" into the terminal window and pressing "Enter."

  • No comments: