Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

13. MacPorts > Using MacPorts

Using MacPorts

Once MacPorts has been installed, you can see what packages are available with the port list command. Since the list is quite long, you may want to pipe that command through the more command.

You can also use the port command to search for specific packages. For example, the command port search tightvnc returns a listing for the tightvnc package, whereas the command port search kde lists all available packages that contain the string kde. The port command may also be used to determine which variants of a given package are available. For example, the output from the port variants gnuplot command lists the universal, darwin, no_x11, and wxwidgets variants of gnuplot.

You can install a package from source with the command sudo port install package. (The port command must be used with sudo whenever the directory /opt/local or /Applications/MacPorts is modified.) This command actually performs several steps prior to installing the package on your system, including checking dependencies, downloading the necessary source code (including source of dependencies), verifying checksums, configuring packages, building and installing any other required packages, and building the requested package in an intermediate work directory within the /opt/local/var/macports/build directory. For example, if you install tightvnc using MacPorts, it is built in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tightvnc. After the package is built, it is installed temporarily in the destroot subdirectory of the work directory.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint