查看原文
其他

软件更新大法

2017-04-12 Y叔 biobabble

曾经有人跟我说Mac没有”installr”包,不方便,于是我甩给他一篇博客:

这篇文章来自于我的博客,写于2014年,原来叫”hello yosemite”

本月R将发布3.4.0版本,所以借此讲讲R的更新问题。本文适用于一大票软件。

Installing OS is painful, you need to re-install all the software and configure them to the way you want. We don’t want to wast time in doing this. To prevent doing this dirty job, we perform an upgrade install instead of clean install. We all have experience of upgrading Windows sucks, .

All the issues you have in old system will be remained, and sometimes new issues will be introduced in the process of upgrading. The system will be slower compare to clean install one.

Life is short, we want a clean system without wasting time in setting software, but how can it be. The answer is yes and no. Firstly, you should have two partitions, one for OS and the other one for your data. Only in this way, you can formatting the system partition and keep your data untouch.

When I was an undergraduate student, I install both  and  in my PC. They were configured to share the same home partition, so that I don’t have to configure software in both of the systems. In OS X, the home directory is not located at traditional path /home/userName, but at /Users/userName. You should change your home directory from system partition to your data partition. If you have done that, you can formatting your system partition as I do and clean install the OS X system.

After the system was installed, I need to install Xcode for compiling software, for compiling  LaTeX documents, and MS office, which is the reason I need .

Almost all the other software I used in OS X is the same as in Linux. After I setting the home directory to my previous location. All the software will perform as in my old system. My setting of the trackpad is remain, and so as my dock items; Firefox have its bookmarks and plugins;  know how to load extensions; Even plugins I installed for MS Word are already there.

I don’t need to do anything, and everything works in their old way.

Upgrading R is tedious, for you need to re-install all the packages. The library path for brew installed R is something like this: ‘/usr/local/Cellar/r/3.1.2/R.framework/Versions/3.1/Resources/library’. If you installed your packages in this folder, you need to from it. The path is long and hard to remember (many soft links may get you lost if you don’t know the function ‘.libPaths()’). My solution is
to install all my packages in ~/Library/R/3.1/library, so after I re-installed R, all the packages are still there. When R is upgrade to 3.2, all I need is to move the folder from 3.1 to 3.2 and use one command ‘update.packages(ask=FALSE, checkBuilt=TRUE)’ to update them. This is a painless way for R and this idea is the secret of painless clean install of UNIX-like systems including OS X.

您可能也对以下帖子感兴趣

文章有问题?点此查看未经处理的缓存