Hi, there: After I upgraded my R to 2.4.1, it is my first time of trying to use MASS and found the following error message:> install.packages("MASS")--- Please select a CRAN mirror for use in this session --- trying URL 'http://cran.cnr.Berkeley.edu/bin/macosx/universal/contrib/2.4/VR_7.2-33.tgz' Content type 'application/x-gzip' length 995260 bytes opened URL =================================================downloaded 971Kb The downloaded packages are in /tmp/RtmpmAzBwa/downloaded_packages> library(MASS)Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library '/Library/Frameworks/R.framework/Versions/2.4/Resources/library/MASS/libs/i386/MASS.so': dlopen(/Library/Frameworks/R.framework/Versions/2.4/Resources/library/MASS/libs/i386/MASS.so, 6): Library not loaded: /usr/local/gcc4.0/i686-apple-darwin8/lib/libgcc_s.1.0.dylib Referenced from: /Library/Frameworks/R.framework/Versions/2.4/Resources/library/MASS/libs/i386/MASS.so Reason: image not found Error: package/namespace load failed for 'MASS'> sessionInfo()R version 2.4.1 (2006-12-18) i386-apple-darwin8.8.1 locale: en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] "stats" "graphics" "grDevices" "utils" "datasets" "methods" "base" other attached packages: randomForest dprep "4.5-18" "1.0"> version_ platform i386-apple-darwin8.8.1 arch i386 os darwin8.8.1 system i386, darwin8.8.1 status major 2 minor 4.1 year 2006 month 12 day 18 svn rev 40228 language R version.string R version 2.4.1 (2006-12-18) Thanks -- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. "Did you always know?" "No, I did not. But I believed..." ---Matrix III
Weiwei, I have never had much success installing packages from within R.app on MacOSX, because the location that it is supposed to save things, / Library/Frameworks/...., needs elevated priviledges, which the app doesn't seem to try to get. So it at best ends up saving it in some temporary location, and it has to be downloaded again next time R is restarted. As a result, I have always downloaded the tgz file from my browser, then go to the terminal in that folder and do a "sudo R CMD INSTALL packagename.tgz". But perhaps I am doing something wrong and one can do this properly from within R.app, I would love to be wrong on this one. > sessionInfo() R version 2.4.1 (2006-12-18) powerpc-apple-darwin8.8.0 locale: en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] "stats" "graphics" "grDevices" "utils" "datasets" "methods" "base" > Haris Skiadas Department of Mathematics and Computer Science Hanover College On Apr 12, 2007, at 6:04 PM, Weiwei Shi wrote:> Hi, there: > > After I upgraded my R to 2.4.1, it is my first time of trying to use > MASS and found the following error message: >> install.packages("MASS") > --- Please select a CRAN mirror for use in this session --- > trying URL 'http://cran.cnr.Berkeley.edu/bin/macosx/universal/ > contrib/2.4/VR_7.2-33.tgz' > Content type 'application/x-gzip' length 995260 bytes > opened URL > =================================================> downloaded 971Kb > > > The downloaded packages are in > /tmp/RtmpmAzBwa/downloaded_packages > >> library(MASS) > Error in dyn.load(x, as.logical(local), as.logical(now)) : > unable to load shared library > '/Library/Frameworks/R.framework/Versions/2.4/Resources/library/ > MASS/libs/i386/MASS.so': > dlopen(/Library/Frameworks/R.framework/Versions/2.4/Resources/ > library/MASS/libs/i386/MASS.so, > 6): Library not loaded: > /usr/local/gcc4.0/i686-apple-darwin8/lib/libgcc_s.1.0.dylib > Referenced from: > /Library/Frameworks/R.framework/Versions/2.4/Resources/library/MASS/ > libs/i386/MASS.so > Reason: image not found > Error: package/namespace load failed for 'MASS' > > >> sessionInfo() > R version 2.4.1 (2006-12-18) > i386-apple-darwin8.8.1 > > locale: > en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 > > attached base packages: > [1] "stats" "graphics" "grDevices" "utils" "datasets" > "methods" "base" > > other attached packages: > randomForest dprep > "4.5-18" "1.0" > > >> version > _ > platform i386-apple-darwin8.8.1 > arch i386 > os darwin8.8.1 > system i386, darwin8.8.1 > status > major 2 > minor 4.1 > year 2006 > month 12 > day 18 > svn rev 40228 > language R > version.string R version 2.4.1 (2006-12-18) > > > Thanks > -- > Weiwei Shi, Ph.D > Research Scientist > GeneGO, Inc.
MASS is part of the standard R installation, as a recommended package. I suggest you try re-installing R and not then trying to download a different version. I would also suggest trying 2.5.0 beta at this stage in preference to 2.4.1 if you do need to re-install R. Beyond that, there is a list (r-sig-mac) for Mac-specific problems (and this is an OS-specific problem). On Thu, 12 Apr 2007, Weiwei Shi wrote:> Hi, there: > > After I upgraded my R to 2.4.1, it is my first time of trying to use > MASS and found the following error message: >> install.packages("MASS") > --- Please select a CRAN mirror for use in this session --- > trying URL 'http://cran.cnr.Berkeley.edu/bin/macosx/universal/contrib/2.4/VR_7.2-33.tgz' > Content type 'application/x-gzip' length 995260 bytes > opened URL > =================================================> downloaded 971Kb > > > The downloaded packages are in > /tmp/RtmpmAzBwa/downloaded_packages > >> library(MASS) > Error in dyn.load(x, as.logical(local), as.logical(now)) : > unable to load shared library > '/Library/Frameworks/R.framework/Versions/2.4/Resources/library/MASS/libs/i386/MASS.so': > dlopen(/Library/Frameworks/R.framework/Versions/2.4/Resources/library/MASS/libs/i386/MASS.so, > 6): Library not loaded: > /usr/local/gcc4.0/i686-apple-darwin8/lib/libgcc_s.1.0.dylib > Referenced from: > /Library/Frameworks/R.framework/Versions/2.4/Resources/library/MASS/libs/i386/MASS.so > Reason: image not found > Error: package/namespace load failed for 'MASS'[...] -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595