Closed fpahlke closed 8 months ago
Dear Jaeil,
Thank you for reaching out regarding your attempt to install the "rpact" package on your Mac OS system. From the details provided, it appears you are running Mac OS version 10.13 and R version 3.1. These versions are indeed quite old, and this is central to the challenges you're encountering.
The Comprehensive R Archive Network (CRAN) typically provides precompiled binaries for packages, which significantly simplifies the installation process. However, these precompiled binaries are generally available only for more recent versions of both R and the operating system. For older versions, such as the ones you are using, a manual compilation of the package from source is necessary.
Since "rpact" includes Fortran code, a Fortran compiler is required to compile the package. Unfortunately, Mac OS does not come with a Fortran compiler installed by default. Here's how you can address these issues:
Install a Fortran Compiler: Before attempting to compile the "rpact" package, you will need to install a Fortran compiler. GCC (GNU Compiler Collection) includes a Fortran compiler (gfortran) that you can install. There are various ways to do this, such as through Homebrew (a package manager for Mac) by running brew install gcc in the terminal.
Compiling "rpact" from Source: Once you have a Fortran compiler installed, you can attempt to compile "rpact". Installing directly from CRAN via install.packages("rpact", type = "source") might work, but given the age of your R version, you might encounter compatibility issues. Alternatively, installing from GitHub would also require compilation. Ensure your development tools and environment are up to date to minimize potential issues.
Consider Updating Your System: Given the age of your software, you might encounter further compatibility issues down the line, not just with "rpact" but with other packages and software as well. If possible, consider updating both your Mac OS and R to newer versions. This would not only alleviate the need to manually compile packages but also ensure better performance and access to the latest features and security enhancements.
Seeking Further Assistance: If you encounter specific errors during the compilation process or have trouble installing the Fortran compiler, please provide the error messages or describe the issues in detail. This information will be crucial for offering more targeted assistance.
Hope that helps.
Best regards, Friedrich
Dear Friedrich,
Thank you for your email. I have tried all solutions found from googling which include the solution (manuall installation/fortran or others) you provided in this email.
One solution without this gfortran problem was not to install all sibling packages (I chose N when R prompt asked me to install all relevant packages).
So now it works perfectly. Thank you so much. And hope that my solution also works for some mac users.
Hello, I am getting help from the example you put up at www.rpact.org/vignettes/planning/rpact_binary_planning_example I am trying to install rpact packge on my mac and I am getting an error message which lead to an installation failure. Specifically, I see this error: