1 2 Previous Next 17 Replies Latest reply: Jan 25, 2013 12:44 PM by 986238 RSS

    R installation R not Found error

    Maqs-Oracle
      Hi Gurus,

      I am trying to install R enterprise Server on Windows XP. I have checked the perquisites and set R_HOME before starting the install.
      However when I run the install.bat it gives R not found error.
      R_HOME environment variable is correctly set as set R_HOME from command line returns the correct path.

      Please advice.

      Thanks
        • 1. Re: R installation R not Found error
          Denis Mukhin-Oracle
          Maqsood,

          To install ORE you need to be able to run R in the command window. You can do this by adding R to the <tt>PATH</tt>. Setting <tt>R_HOME</tt> is optional. The installer will determine <tt>R_HOME</tt> based on the R executable that it will find. So once you can start R in the command window by typing <tt>R</tt> the installer should be happy.

          Denis
          • 2. Re: R installation R not Found error
            981516
            do you execute library(ORE) in R?
            I think help you
            Mahdi
            • 3. Re: R installation R not Found error
              986238
              Hi Denis,

              Can you provide more detail of your answer? A step by step instruction would be helpful.

              Thanks,
              Henry

              Edited by: 983235 on Jan 21, 2013 2:52 PM
              • 4. Re: R installation R not Found error
                Denis Mukhin-Oracle
                I am assuming the question was about setting PATH environment variable in Windows. This is somewhat dependent on the version of Windows (with minor variations). I am running XP so are the steps for XP.
                1. Right click on "My computer" and choose "Properties"
                2. Go to "Advanced" tab
                3. Click on "Environment Variables"
                4. Look for Path variable under "System variables"
                5. Select and click "Edit"
                6. Add the path to R's bin directory (C:\Program Files\R\R-2.15.1\bin) followed by ; at the beginning of the existing string (do not remove what it already there - just ad new directory)
                7. Click "Ok (three times)
                8. Start a command window

                To start a command window:
                1. go to "Start" -> "Run"
                2. enter cmd
                • 5. Re: R installation R not Found error
                  986238
                  Hi Denis,

                  I appreciate your quick response.

                  Updating the "PATH" system variable got passed the message "ERROR: R not found".
                  Now it is getting "ERROR: R_HOME not found"

                  I tried running the install.bat from directory: "C:\Program Files\R\R-2.15.2\bin\" and was presented with "ERROR: ORACLE_HOME" is not set.

                  Am I missing steps regarding setting up the "R_HOME" and "ORACLE_HOME" and other variables in Windows?
                  I only saw these variables mentioned in steps for Linux and Solaris Client install (page 25 and 26 of Oracle R Enterprise user's Guide")

                  Please advice...

                  By the way, from the install.bat file, do you know what these statements perform?
                  ---------------
                  call:shell R RHOME

                  :shell
                  set RET=
                  for /f "tokens=1*" %%A IN ('%~1 %~2') do set RET=%%A
                  ---------------

                  Thanks,
                  Henry
                  • 6. Re: R installation R not Found error
                    Denis Mukhin-Oracle
                    Henry,

                    The code snippet that you provided uses R to query for R_HOME. In ORE 1.3 we no longer require setting R_HOME but we need to be able to find R. I am not 100% sure if this is true in ORE 1.1. I can check if you are interested. I guess you got this snippet from 1.1 ... In any case, to get you past your install problems, please, set R_HOME environment variable to the location where R was installed on your system (on my box it is C:\Program Files\R\R-2.15.1). You will also need to set ORACLE_HOME to where your database was installed (on my box it is C:\app\dmukhin\product\11.2.0\dbhome_2). You will also need to set ORACLE_SID (the default value is usually orcl). If you get stuck just post a question to this forum. Someone from the ORE team should be able to help.

                    Denis
                    • 7. Re: R installation R not Found error
                      986238
                      I appreciate your help...

                      Per your recommendation, the script ran much further after adding the variables.

                      Now, I have this message:
                      “Error: cannot install OREbase to c:\app\11g\product\11.2.0\dbhome_1\R\Library”

                      I verified that the folder existed and was empty.

                      Any idea?

                      Thanks,
                      Henry
                      • 8. Re: R installation R not Found error
                        Denis Mukhin-Oracle
                        Henry,

                        Actually you went rather far. The DB piece is completely installed. At this point only package installation is missing. This looks like a permission problem, although the directory creation went through ok. Could you, please, try running the following command in the install directory (where you have install.bat file) and paste the result. This should help in trouble shooting.
                        R --vanilla CMD INSTALL --library=c:\app\11g\product\11.2.0\dbhome_1\R\Library OREbase_1.1.zip
                        On some versions of Windows you can run cmd "as Administrator". If it is the case for your system, try running your command window "as Administartor" for the command above. For example on Windows 7 when you look for cmd under Start->Run you can right click on "cmd" and choose "Run as Administrator".

                        Denis
                        • 9. Re: R installation R not Found error
                          986238
                          I initially got "The system cannot find the path specified." when I ran the command.
                          Then, I copied OREbase_1.1.zip to the folder where R.exe is located and successfully ran the command with this message:
                          "package 'OREbase' successfully unpacked and MD5 sums checked".

                          To verify that my installation is working I looked at the step "Start the Oracle R Enterprise Client on Microsoft Windows".
                          The instruction states: ""Before you execute the code, modify the connection information (user, sid, host, password, and port) for the database where the R Sever is installed:"

                          I modified the connection information and executed in the R window and got this:
                          Error: could not find function "ore.connect"

                          Where do I create this function and how? Is there a create function command with the connection information included?

                          Thanks,
                          Henry
                          • 10. Re: R installation R not Found error
                            Denis Mukhin-Oracle
                            Henry,

                            <tt>OREbase</tt> is just one of the packages that ORE needs. To complete the installation you will need to install the same way the following packages: <tt>OREeda_1.1.zip, OREgraphics_1.1.zip, OREstats_1.1.zip, ORExml_1.1.zip, ORE_1.1.zip</tt>. Additionally, you will need to install supporting packages from *"Oracle R Enterprise Client Supporting Packages for Windows Platform"*. It contains the following three packages: <tt>DBI_0.2-5.zip, png_0.1-4.zip, ROracle_1.1-2.zip</tt> under <tt>bin</tt> sub-directory.

                            Then you can run ORE. Before issuing <tt>ore.connect()</tt> you should load ORE by doing <tt>library(ORE)</tt>. For the database that is running locally you can do something like this:
                            library(ORE)
                            ore.connect("scott", password = "tiger", conn_string = "")
                            ore.sync()
                            ore.attach()
                            ore.ls()
                            If you have any tables or views in your schema <tt>ore.ls()</tt> will show them.

                            Denis
                            • 11. Re: R installation R not Found error
                              986238
                              I ran the command and now have the following sub-directories in /library directory:
                              ORE, OREbase, OREeda, OREgraphics, OREstats

                              However, when I ran the R script, I saw this error:
                              library(ORE)
                              Error in library(ORE) : there is no package called ‘ORE’

                              Please advice...

                              Thanks,
                              Henry
                              • 12. Re: R installation R not Found error
                                Denis Mukhin-Oracle
                                Henry,

                                Normally on the server we recommend starting R by running an <tt>ORE.bat</tt> script. The script sets the location of the library to where ORE packages were installed by setting <tt>R_LIBS_USER</tt> environment variable. Unfortunately in your case the installation did not get to creating this script. To get you running you can try setting <tt>R_LIBS_USER</tt> just before running R in the command window or setting it similarly to other environment variables (like you did before).
                                set R_LIBS_USER=c:\app\11g\product\11.2.0\dbhome_1\R\Library
                                R
                                Denis
                                • 13. Re: R installation R not Found error
                                  986238
                                  Created variable: R_LIBS_USER
                                  Then got: Error: package ‘ROracle’ required by ‘OREbase’ could not be found

                                  perform --vanilla CMD for ROracle_1.1-2.zip

                                  Now getting: Error: package ‘DBI’ could not be loaded ... there is no package called ‘DBI’

                                  Is there any other variable I need to be aware of?

                                  Thanks,
                                  Henry
                                  • 14. Re: R installation R not Found error
                                    Denis Mukhin-Oracle
                                    Henry,

                                    Have you done
                                    R --vanilla CMD INSTALL --library=c:\app\11g\product\11.2.0\dbhome_1\R\Library DBI_0.2-5.zip
                                    Denis
                                    1 2 Previous Next