updates of installation bear with macOS (Mojave) [🇷 for BE/BA]
Dear all,
This is to renew my previous post about installation of bear (or my other R packages using RGtk2 package. For Windows OS or Linux users, the previous posts still hold true. Now, the problem occurs with macOS (Mojave). If you upgrade R to current version (v3.6.1), you may need to read this carefully. The key point is the issue of RGtk2 package installation. As default from preinst.r, RGtk2 is installed as type="binary" which is default for install.packages() function. For most of R packages, this should be no problem at all with macOS. Unfortunately, RGtk2 is an exception. So we need to install RGtk2 correctly; otherwise you will get error messages something like
And there will be a popup window to ask if ‘Need GTK+?’ which was a broken link and was unable to install GTK+ (driver). I have tried thousand times and failed to connect. However, if you can get it from it, do not use it. If you try to install RGtk2 from its source with
Please note that x.xx.xx is the version # of the package. Make sure they are correct. Then RGtk2 should be able to be installed successfully. If it is your first time to install bear, please run
This is to renew my previous post about installation of bear (or my other R packages using RGtk2 package. For Windows OS or Linux users, the previous posts still hold true. Now, the problem occurs with macOS (Mojave). If you upgrade R to current version (v3.6.1), you may need to read this carefully. The key point is the issue of RGtk2 package installation. As default from preinst.r, RGtk2 is installed as type="binary" which is default for install.packages() function. For most of R packages, this should be no problem at all with macOS. Unfortunately, RGtk2 is an exception. So we need to install RGtk2 correctly; otherwise you will get error messages something like
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RGtk2/libs/RGtk2.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RGtk2/libs/RGtk2.so, 6): Library not loaded: /Library/Frameworks/GTK+.framework/Versions/2.24.X11/Resources/lib/libgtk-x11-2.0.0.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RGtk2/libs/RGtk2.so
Reason: image not found
And there will be a popup window to ask if ‘Need GTK+?’ which was a broken link and was unable to install GTK+ (driver). I have tried thousand times and failed to connect. However, if you can get it from it, do not use it. If you try to install RGtk2 from its source with
install.packages("RGtk2",type="source")
, you will get another error messages "... gtk is not found. gtk 2.8.0 or above is required.' That implies gtk+ installation previously using Homebrew is not recognized by R any more. So the following steps can resolve this problem (tested with bear v2.8.4/R v3.6.1 with macOS (Mojave)).- go and browse this website and try to install RGtk2 package from its source. In summary, you will need Xcode and Xcode command line tool and MacPorts. Download and install. Go to CRAN mirror to download RGtk2 and cairoDevice source tarballs (*.tar.gz). Put these two tar ball files under your working directory. And open a terminal type
$ export PATH=/opt/local/bin:/opt/local/sbin:$PATH
$ sudo port selfupdate
$ sudo port install pkgconfig
$ sudo port install gtk2 +x11 ### <- this is extremely important.
$ R CMD INSTALL RGtk2_x.xx.xx.tar.gz
$ R CMD INSTALL cairoDevice_x.xx.tar.gz
Please note that x.xx.xx is the version # of the package. Make sure they are correct. Then RGtk2 should be able to be installed successfully. If it is your first time to install bear, please run
source("preinst.r")
under R console. Then download bear (source or binary) from Sourceforge and install it with a terminal and type R CMD INSTALL bear_x.xx.xx.tar.gz
or R CMD INSTALL bear_x.xx.xx.tgz
where x.xx.xx is the version # again. Interesting to find out that with macOS, these two commands R CMD INSTALL bear_x.xx.xx.tar.gz
and sudo R CMD INSTALL bear_x.xx.xx.tar.gz
do the same things. They all install the package to the same directory. That is very different from Windows OS and Linux. If we type .libPaths()
under R console, there is only one library path. Let me know if I was wrong about this. I will update preinst.r later and make it to install/build RGtk2 package from source only for macOS. I feel that gtk2 installed from Macports is much more stable than the previous one (gtk+) from Homebrew.—
All the best,
-- Yung-jin Lee
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
All the best,
-- Yung-jin Lee
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
Complete thread:
- updates of installation bear with macOS (Mojave)yjlee168 2019-07-08 10:15 [🇷 for BE/BA]
- upgrade R with macOS (Mojave) yjlee168 2019-07-08 10:40
- an old itch when running RGtk2 (GUI) with macOS yjlee168 2019-07-08 11:14
- upgrade/re-install cairoDevice package from source (macOS) yjlee168 2019-08-11 20:29
- updates of installation bear with macOS (Mojave) mahmoud-teaima 2020-04-09 13:01
- bear with Catalina OS yjlee168 2020-04-09 15:46
- Installing R v4.0.0 & bear on Catalina (macOS 10.15.3) yjlee168 2020-04-29 10:19
- updates of installing bear/R v4.0.0 with macOS (Catalina) mahmoud-teaima 2020-04-29 15:09
- tricks of R v4.0.0 yjlee168 2020-04-29 16:13
- tricks of R v4.0.0 mahmoud-teaima 2020-04-29 23:00
- tricks of R v4.0.0 yjlee168 2020-04-30 01:19
- tricks of R v4.0.0 mahmoud-teaima 2020-05-01 01:38
- errors of bear in R v4.0.0 yjlee168 2020-05-01 23:42
- errors of bear in R v4.0.0 yjlee168 2020-05-05 01:53
- tricks of R v4.0.0 mahmoud-teaima 2020-05-01 01:38
- tricks of R v4.0.0 yjlee168 2020-04-30 01:19
- speed? Helmut 2020-04-30 12:38
- OT: What a relief :-) ElMaestro 2020-04-30 13:04
- OT: What a relief :-) Helmut 2020-04-30 15:21
- speed? yjlee168 2020-04-30 15:53
- speed? Helmut 2020-04-30 17:30
- speed? yjlee168 2020-04-30 18:40
- speed? Helmut 2020-04-30 23:40
- Xeon CPU yjlee168 2020-05-02 00:02
- Xeon (workstation, server) ↔ Core iX (desktop) Helmut 2020-05-02 01:22
- Xeon CPU yjlee168 2020-05-02 00:02
- speed? Helmut 2020-04-30 23:40
- speed? yjlee168 2020-04-30 18:40
- speed? Helmut 2020-04-30 17:30
- OT: What a relief :-) ElMaestro 2020-04-30 13:04
- tricks of R v4.0.0 mahmoud-teaima 2020-04-29 23:00
- tricks of R v4.0.0 yjlee168 2020-04-29 16:13
- updates of installing bear/R v4.0.0 with macOS (Catalina) mahmoud-teaima 2020-04-29 15:09
- updates of installation bear with macOS (Mojave) jabriges 2020-05-10 04:42
- errors of installation bear with Catalina yjlee168 2020-05-10 22:30
- errors of installation bear with Catalina jabriges 2020-05-10 23:42
- errors of installation bear with Catalina yjlee168 2020-05-11 00:40
- errors of installation bear with Catalina jabriges 2020-05-11 05:05
- bear v2.8.8 pre-release built under R v4.0.0 for macOS yjlee168 2020-05-11 11:15
- still having problems w/ bear v2.8.8 for R v4.0.0 for macOS jabriges 2020-05-11 18:06
- still having problems w/ bear v2.8.8 for R v4.0.0 for macOS yjlee168 2020-05-11 20:23
- still having problems w/ bear v2.8.8 for R v4.0.0 for macOS jabriges 2020-05-11 21:00
- still having problems w/ bear v2.8.8 for R v4.0.0 for macOS yjlee168 2020-05-11 21:21
- utils::install.packages() Helmut 2020-05-12 14:10
- depend = NA means ... yjlee168 2020-05-12 19:53
- install.package() for the source packages mittyri 2020-07-18 23:17
- install.package() for the source packages yjlee168 2020-07-20 00:53
- desription Suggests section mittyri 2020-07-20 13:27
- install.package() for the source packages yjlee168 2020-07-20 00:53
- install.package() for the source packages mittyri 2020-07-18 23:17
- depend = NA means ... yjlee168 2020-05-12 19:53
- utils::install.packages() Helmut 2020-05-12 14:10
- still having problems w/ bear v2.8.8 for R v4.0.0 for macOS yjlee168 2020-05-11 21:21
- still having problems w/ bear v2.8.8 for R v4.0.0 for macOS jabriges 2020-05-11 21:00
- still having problems w/ bear v2.8.8 for R v4.0.0 for macOS yjlee168 2020-05-11 20:23
- still having problems w/ bear v2.8.8 for R v4.0.0 for macOS jabriges 2020-05-11 18:06
- errors of installation bear on Windows Andrew S 2020-05-17 08:09
- errors of installation bear (R v4.0.0) on Windows yjlee168 2020-05-17 20:43
- errors of installation bear (R v4.0.0) on Windows Andrew S 2020-05-18 04:20
- errors of installation bear (R v4.0.0) on Windows elba.romero 2020-07-17 07:12
- errors of installation bear (R v4.0.0) on Windows Helmut 2020-07-17 10:46
- errors of installation bear (R v4.0.0) on Windows elba.romero 2020-07-18 17:43
- errors of installation bear (R v4.0.0) on Windows yjlee168 2020-07-20 01:00
- errors of installation bear (R v4.0.0) on Windows elba.romero 2020-07-28 03:18
- Accidentally perfect? yjlee168 2020-07-28 11:44
- Accidentally perfect? elba.romero 2020-07-28 18:58
- Accidentally perfect? yjlee168 2020-07-28 11:44
- errors of installation bear (R v4.0.0) on Windows elba.romero 2020-07-28 03:18
- errors of installation bear (R v4.0.0) on Windows yjlee168 2020-07-20 01:00
- errors of installation bear (R v4.0.0) on Windows elba.romero 2020-07-18 17:43
- errors of installation bear (R v4.0.0) on Windows Helmut 2020-07-17 10:46
- errors of installation bear (R v4.0.0) on Windows yjlee168 2020-05-17 20:43
- bear v2.8.8 pre-release built under R v4.0.0 for macOS yjlee168 2020-05-11 11:15
- errors of installation bear with Catalina jabriges 2020-05-11 05:05
- errors of installation bear with Catalina yjlee168 2020-05-11 00:40
- errors of installation bear with Catalina jabriges 2020-05-10 23:42
- errors of installation bear with Catalina yjlee168 2020-05-10 22:30
- upgrade R with macOS (Mojave) yjlee168 2019-07-08 10:40