9 Mac OS X Port Command Examples to Install and Update Packages

Port is a terminal command utility which is used to update open source software on Mac OS X.

The port command is bundled as part of MacPorts Framework.

You can install port command either by downloading and installing the binary version for your corresponding Mac OS X, or by downloading the source code and compiling it on your OS X version.

The binary file of MacPorts for various version of OSX are available here. Once you download the binary version, just click on the package to install it. You should have administrator right on your system to install it. X-code is pre-req for MacPorts. If you don’t have X-code on your system, it will display a warning message.

1. Update Port List using selfupdate

Immediately after you install the port command, you should update the available port list by doing a selfupdate as shown below.

$ sudo port -d selfupdate
—> Updating MacPorts base sources using rsyncbase.tar
MacPorts base version 2.2.1 installed,
DEBUG: Rebuilding and reinstalling MacPorts if needed
MacPorts base version 2.2.1 downloaded.
—> Updating the ports tree
Synchronizing local ports tree from 
The ports tree has been updated.

If you are behind the proxy, you need to add the following lines to /etc/sudoers file as sudoer before you perform selfupdate:

Defaults env keep += "ALL PROXY NO PROXY"

Add the following lines to your .bashrc at your home folder to get port connect from behind a proxy:

export RSYNC PROXY='username:password@proxyhostname:port number'
export HTTP PROXY='http://username:password@proxyhostname:port number'
export HTTPS PROXY='https://username:password@proxyhostname:port number'
export FTP PROXY='ftp://username:password@proxyhostname:port number'

2. Upgrade All Outdated Packages

After selfupdate it will ask you to do port upgrade for all outdated installed ports. You can upgrade all outdated packages using “upgrade outdated” option as shown below.

$ sudo port upgrade outdated
—> Computing dependencies for openssl
—> Fetching archive for openssl
—> Attempting to fetch openssl-1.0.1f 0.darwin 13.x86 64.tbz2 
 from http://mse.uk.packages.macports
—> Attempting to fetch openssl-1.0.1f 0.darwin 13.x86 64.tbz2.rmd160 
 from http://mse.uk.packages.m
—> Installing openssl @1.0.1f 0
—> Cleaning openssl
—> Computing dependencies for openssl
—> Deactivating openssl @1.0.1e 1
—> Cleaning openssl
—> Activating openssl @1.0.1f 0
—> Cleaning openssl

3. Search for a Specific Package

You can search for a specific package by using a keyword. This will search for all available packages with the given keyword, and display the corresponding version number of the available packages also.

The following will search and list all packages that contains the keyword “tmux” either in package name or description as shown below.

$ port search tmux
rainbarf @1.1 (sysutils) CPU/RAM/battery stats chart bar for tmux (and GNU screen)
tmux @1.8 1 (sysutils) terminal multiplexer
tmux-pasteboard @2.2 (sysutils) Wrapper to use pasteboard services in tmux
wemux @2.2.0 1 (devel) wemux enhances tmux to make multi-user terminal multiplexing easier and powerful.
Found 4 ports.

4. Install a Specific Package

On you searched for a specific package, you can install it using “install” option as shown below.

When you install a package, it displays all the dependent packages, and install them one by one before installing the given package.

The following will install tmux package. As shown below, it will also install the dependent package “libevent” first, before installing tmux.

$ sudo port install tmux
—> Computing dependencies for tmux
—> Dependencies to be installed: libevent
—> Fetching archive for libevent
—> Installing libevent @2.0.21 0
—> Activating libevent @2.0.21 0
—> Cleaning libevent
—> Fetching archive for tmux
—> Attempting to fetch tmux-1.8 1.darwin 13.x86 64.tbz2 from http://lil.fr.packages.macports.org/tm
—> Attempting to fetch tmux-1.8 1.darwin 13.x86 64.tbz2.rmd160 from http://lil.fr.packages.macport
—> Installing tmux @1.8 1
—> Activating tmux @1.8 1
—> Cleaning tmux
—> Updating database of binaries: 100.0
—> Scanning binaries for linking errors: 100.0
—> No broken files found.

5. View Dependent Packages

If you just want to view all the dependent packages before installing a package, you can do it using deps option as shown below.

This is also helpful to view the dependencies of a package that is already installed.

The following will display all the dependent packages for tmux. As you see below, tmux is dependent on libevent and ncurses packages.

$ sudo port deps tmux
Full Name: tmux @1.8 1
Library Dependencies: libevent, ncurses

6. Uninstall a Package

To uninstall a package, use the uninstall option as shown below. When you uninstall a package, it will not remove the dependencies, it will uninstall only the given package.

The following will uninstall the htop package.

$ sudo port uninstall htop
—> Deactivating htop @ 0
—> Cleaning htop
—> Uninstalling htop @ 0
—> Cleaning htop

7. Uninstall All Old Packages

You can uninstall all old versions of the packages that are not being used now using the “uninstall inacative” option as shown below. Use the -f option also, which will force uninstall all inactive packages as shown below.

$> sudo port -f uninstall inactive
—> Uninstalling automake @1.14 0
—> Cleaning automake
—> Uninstalling gnuplot @4.6.4 1+aquaterm+luaterm+pangocairo+wxwidgets+x11
—> Cleaning gnuplot
—> Uninstalling gnuplot @4.6.4 2+aquaterm+luaterm+pangocairo+wxwidgets+x11
—> Cleaning gnuplot
—> Uninstalling graphviz @2.34.0 2+pangocairo+x11
—> Cleaning graphviz
—> Uninstalling pango @1.36.1 0+x11
—> Cleaning pango
—> Uninstalling texlive-bin @2013 4+x11
—> Cleaning texlive-bin
—> Uninstalling poppler @0.24.4 0
—> Cleaning poppler

8. Delete Downloads of Installed Packages

When you install a package, it downloads the package and then installs it on your system. Once the package is installed, the downloaded file takes-up unnecessary disk space on your system. So, it is a good idea to delete all these downloaded packages once in a while using the “clean -all installed” option.

The following will delete all downloaded packages that are used during installation, but not required anymore, as they are already installed.

$ sudo port clean –all installed
—> Cleaning 2Pong
—> Cleaning 3proxy
—> Cleaning 4th
—> Cleaning 9e
—> Cleaning 54321
—> Cleaning a2ps
—> Cleaning a2ps-j
—> Cleaning a52dec

9. Delete Downloads of All Packages

Sometimes you might’ve downloaded a package, but not installed it on your system yet. You can delete all downloads irrespective of whether they are already installed or not on your system using “clean -all all” option as shown below.

The following will delete all downloaded packages (both installed and not-installed).

$ sudo port clean –all all
—> Cleaning 2Pong
—> Cleaning 3proxy
—> Cleaning 4th
—> Cleaning 9e
—> Cleaning 54321
—> Cleaning a2ps
—> Cleaning a2ps-j
—> Cleaning a52dec
By vichhaiy Posted in Linux

All lecturature sources

All literatures of aspects

◦ Google Scholar: scholar.google.com (Some articles are free)

◦ Science Direct (Elsevier): sciencedirect.com (Subscription is needed)

◦ Inderscience: http://www.inderscience.com/

◦ Harvard University Scholar: http://scholar.harvard.edu/

◦ IGI Global: http://www.igi-global.com/

◦ Oxford Journal: http://www.oxfordjournals.org/

◦ Emerald Insight: http://www.emeraldinsight.com/

◦ SAGE Journal: http://online.sagepub.com/

Electronic and Electrical Engineering:

◦ IEEE: ieee.org (Subscription is required)

◦ IEICE: ieice.org (Subscription is required)

◦ MIS Quarterly: http://www.misq.org/ (Subscription is needed)

◦ Springer: www.springer.com

Apple Fixes iOS 7 ‘Screen of Death’

Apple Inc has confirmed that the iPhone’s iOS 7.1 update will fix the dreaded white or black “screen of death.” The nickname “screen of death” was dubbed from Microsoft’s infamous “blue screen of death” that users can sometimes encounter running many versions of Microsoft’s Windows. Apple’s screen of death sometimes occurred when a user running iOS 7 would attempt to start-up their iPhone and encounter a white or black screen upon the device crashing.

The next software update fix for iOS 7 has been confirmed by Apple will be rolled out during their next software update. Apple spokesperson Trudy Muller talked to sources today.

“We have a fix in an upcoming software update for a bug that can occasionally cause a home screen crash.”

iOS 7 crashes on iPhones (including the latest iPhone 5S) were totally random occurrences that do not occur on iPads running the same version of the Apple OS. Upon start-up of the iPhone a user would randomly see a black or white screen as the phone’s OS crashed. The only fix for the freeze in booting was to hard-reset the phone.

The screen of death started to appear in Apple’s discussion boards in September 2013. According to user reports the problem would be more prevalent when the charge in the iPhone’s battery reached 30 percent or under. It was speculated that the iPhone required more stored power than the depleted battery could supply, causing the phone to turn off while performing vital boot-up tasks.

Whether the iPhone displayed a white or black screen of death also seemed to be governed by the iPhone’s face color. iPhones with the white face use a white boot screen with a black Apple logo, while a black-faced phone produced the black screen with a white Apple logo.

The iOS 7.1 update will be the fourth beta version for Apple developers. The fix for the screen of death will not be the only fix that Apple rolls out with their latest version of the latest OS. Slight tweaks for the user interface (UI) are also said to be included in this next version. Rumors have been floating around that Apple may also be introducing the iOS 7 to new features that allow a user to connect the iPhone to their car. Some other rumors speculate that users in the UK will get a new female voice for their Siri personal virtual assistant.

Other rumors being heard are of changes coming to iOS 7.1’s UI. It is being heard through tech channels that iOS 7.1 will include more round buttons across a wider range of apps and services. Pill-shaped buttons are also said to be placed behind the text links that replaced the buttons in the previous version of the OS.

At this point the iOS 7.1 screen of death fix has no firm release date. The fourth beta version was just delivered to Apple developers and some speculate that they may already have a couple of beta versions impending. This has led experts to predict that Apple may release this update to a wider audience as early as late February 2014 to the end of March.

By Brent Matsalla

See also: iOS 7.1 Latest Update From Apple