how to install RJDBC package on ubuntu
I am new to R. I installed R with apt-get on ubuntu. I want to run a R script locally that connects to DB using RJDBC.
I am trying to install RJDBC package. I installed it with following steps
R> install.packages("RJDBC")
It asked if I want to create personal directory I entered yes.
Now when I try library(RJDBC)
in R script it gives me an error no such package found.
I am not installing RStudio. I want to simply create R script and run it with Rscript command. I installed Rscript for the same reason.
Am I missing something?
I'm using Ubuntu instance. Any help is greatly appreciated.
install.packages("/tmp/RtmpRgKgmc/downloaded_packages/txtplot_1.0-3.tar.gz", repos= NULL , type = "source")
Installing package into ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
> library('txtplot')
Error in library("txtplot") : there is no package called ‘txtplot’
>
UPDATE:
I have been trying it for hours now. But its not installing any package. I am on Ubuntu 14.04 and after installation it is installing R 3.0.2 version.
I ran below on R console. But it never installs it. Just downloads packages into temp folder.
trying URL 'http://cran.cnr.berkeley.edu/src/contrib/plumber_0.4.6.tar.gz'
Content type 'application/x-gzip' length 83174 bytes (81 Kb)
opened URL
==================================================
downloaded 81 Kb
The downloaded source packages are in
‘/tmp/RtmppYMbcW/downloaded_packages’
What Do I do next?
I followed installation steps from here. https://medium.com/@GalarnykMichael/install-r-and-rstudio-on-ubuntu-12-04-14-04-16-04-b6b3107f7779
r ubuntu rscript
|
show 5 more comments
I am new to R. I installed R with apt-get on ubuntu. I want to run a R script locally that connects to DB using RJDBC.
I am trying to install RJDBC package. I installed it with following steps
R> install.packages("RJDBC")
It asked if I want to create personal directory I entered yes.
Now when I try library(RJDBC)
in R script it gives me an error no such package found.
I am not installing RStudio. I want to simply create R script and run it with Rscript command. I installed Rscript for the same reason.
Am I missing something?
I'm using Ubuntu instance. Any help is greatly appreciated.
install.packages("/tmp/RtmpRgKgmc/downloaded_packages/txtplot_1.0-3.tar.gz", repos= NULL , type = "source")
Installing package into ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
> library('txtplot')
Error in library("txtplot") : there is no package called ‘txtplot’
>
UPDATE:
I have been trying it for hours now. But its not installing any package. I am on Ubuntu 14.04 and after installation it is installing R 3.0.2 version.
I ran below on R console. But it never installs it. Just downloads packages into temp folder.
trying URL 'http://cran.cnr.berkeley.edu/src/contrib/plumber_0.4.6.tar.gz'
Content type 'application/x-gzip' length 83174 bytes (81 Kb)
opened URL
==================================================
downloaded 81 Kb
The downloaded source packages are in
‘/tmp/RtmppYMbcW/downloaded_packages’
What Do I do next?
I followed installation steps from here. https://medium.com/@GalarnykMichael/install-r-and-rstudio-on-ubuntu-12-04-14-04-16-04-b6b3107f7779
r ubuntu rscript
1
Did you see any error messages? Try installing the package again, and copy the output of the command in your question.
– Scott Ritchie
Nov 15 '18 at 14:58
@ScottRitchie added
– Pat
Nov 15 '18 at 15:24
There has probably been an error during the installation; You may have seen something like "installation of... had non-zero exit status". If you post the output of that error message it may be possible to help.
– RHertel
Nov 15 '18 at 15:25
@Pat Your edit does not contain the complete / relevant part of the output.
– RHertel
Nov 15 '18 at 15:26
@RHertel I opened R console and typedlibrary()
I could see base packages installed. After that I did the above. After above steps I run library() again it gives me nothing except warning.
– Pat
Nov 15 '18 at 15:28
|
show 5 more comments
I am new to R. I installed R with apt-get on ubuntu. I want to run a R script locally that connects to DB using RJDBC.
I am trying to install RJDBC package. I installed it with following steps
R> install.packages("RJDBC")
It asked if I want to create personal directory I entered yes.
Now when I try library(RJDBC)
in R script it gives me an error no such package found.
I am not installing RStudio. I want to simply create R script and run it with Rscript command. I installed Rscript for the same reason.
Am I missing something?
I'm using Ubuntu instance. Any help is greatly appreciated.
install.packages("/tmp/RtmpRgKgmc/downloaded_packages/txtplot_1.0-3.tar.gz", repos= NULL , type = "source")
Installing package into ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
> library('txtplot')
Error in library("txtplot") : there is no package called ‘txtplot’
>
UPDATE:
I have been trying it for hours now. But its not installing any package. I am on Ubuntu 14.04 and after installation it is installing R 3.0.2 version.
I ran below on R console. But it never installs it. Just downloads packages into temp folder.
trying URL 'http://cran.cnr.berkeley.edu/src/contrib/plumber_0.4.6.tar.gz'
Content type 'application/x-gzip' length 83174 bytes (81 Kb)
opened URL
==================================================
downloaded 81 Kb
The downloaded source packages are in
‘/tmp/RtmppYMbcW/downloaded_packages’
What Do I do next?
I followed installation steps from here. https://medium.com/@GalarnykMichael/install-r-and-rstudio-on-ubuntu-12-04-14-04-16-04-b6b3107f7779
r ubuntu rscript
I am new to R. I installed R with apt-get on ubuntu. I want to run a R script locally that connects to DB using RJDBC.
I am trying to install RJDBC package. I installed it with following steps
R> install.packages("RJDBC")
It asked if I want to create personal directory I entered yes.
Now when I try library(RJDBC)
in R script it gives me an error no such package found.
I am not installing RStudio. I want to simply create R script and run it with Rscript command. I installed Rscript for the same reason.
Am I missing something?
I'm using Ubuntu instance. Any help is greatly appreciated.
install.packages("/tmp/RtmpRgKgmc/downloaded_packages/txtplot_1.0-3.tar.gz", repos= NULL , type = "source")
Installing package into ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
> library('txtplot')
Error in library("txtplot") : there is no package called ‘txtplot’
>
UPDATE:
I have been trying it for hours now. But its not installing any package. I am on Ubuntu 14.04 and after installation it is installing R 3.0.2 version.
I ran below on R console. But it never installs it. Just downloads packages into temp folder.
trying URL 'http://cran.cnr.berkeley.edu/src/contrib/plumber_0.4.6.tar.gz'
Content type 'application/x-gzip' length 83174 bytes (81 Kb)
opened URL
==================================================
downloaded 81 Kb
The downloaded source packages are in
‘/tmp/RtmppYMbcW/downloaded_packages’
What Do I do next?
I followed installation steps from here. https://medium.com/@GalarnykMichael/install-r-and-rstudio-on-ubuntu-12-04-14-04-16-04-b6b3107f7779
r ubuntu rscript
r ubuntu rscript
edited Nov 15 '18 at 22:35
MrFlick
123k11141171
123k11141171
asked Nov 15 '18 at 14:33
PatPat
16914
16914
1
Did you see any error messages? Try installing the package again, and copy the output of the command in your question.
– Scott Ritchie
Nov 15 '18 at 14:58
@ScottRitchie added
– Pat
Nov 15 '18 at 15:24
There has probably been an error during the installation; You may have seen something like "installation of... had non-zero exit status". If you post the output of that error message it may be possible to help.
– RHertel
Nov 15 '18 at 15:25
@Pat Your edit does not contain the complete / relevant part of the output.
– RHertel
Nov 15 '18 at 15:26
@RHertel I opened R console and typedlibrary()
I could see base packages installed. After that I did the above. After above steps I run library() again it gives me nothing except warning.
– Pat
Nov 15 '18 at 15:28
|
show 5 more comments
1
Did you see any error messages? Try installing the package again, and copy the output of the command in your question.
– Scott Ritchie
Nov 15 '18 at 14:58
@ScottRitchie added
– Pat
Nov 15 '18 at 15:24
There has probably been an error during the installation; You may have seen something like "installation of... had non-zero exit status". If you post the output of that error message it may be possible to help.
– RHertel
Nov 15 '18 at 15:25
@Pat Your edit does not contain the complete / relevant part of the output.
– RHertel
Nov 15 '18 at 15:26
@RHertel I opened R console and typedlibrary()
I could see base packages installed. After that I did the above. After above steps I run library() again it gives me nothing except warning.
– Pat
Nov 15 '18 at 15:28
1
1
Did you see any error messages? Try installing the package again, and copy the output of the command in your question.
– Scott Ritchie
Nov 15 '18 at 14:58
Did you see any error messages? Try installing the package again, and copy the output of the command in your question.
– Scott Ritchie
Nov 15 '18 at 14:58
@ScottRitchie added
– Pat
Nov 15 '18 at 15:24
@ScottRitchie added
– Pat
Nov 15 '18 at 15:24
There has probably been an error during the installation; You may have seen something like "installation of... had non-zero exit status". If you post the output of that error message it may be possible to help.
– RHertel
Nov 15 '18 at 15:25
There has probably been an error during the installation; You may have seen something like "installation of... had non-zero exit status". If you post the output of that error message it may be possible to help.
– RHertel
Nov 15 '18 at 15:25
@Pat Your edit does not contain the complete / relevant part of the output.
– RHertel
Nov 15 '18 at 15:26
@Pat Your edit does not contain the complete / relevant part of the output.
– RHertel
Nov 15 '18 at 15:26
@RHertel I opened R console and typed
library()
I could see base packages installed. After that I did the above. After above steps I run library() again it gives me nothing except warning.– Pat
Nov 15 '18 at 15:28
@RHertel I opened R console and typed
library()
I could see base packages installed. After that I did the above. After above steps I run library() again it gives me nothing except warning.– Pat
Nov 15 '18 at 15:28
|
show 5 more comments
1 Answer
1
active
oldest
votes
Try this to choose the installation path of the library (where my_user
is your user, 3.4
the version of R, my_package
is your package. Repos
is optional)
install.packages('mypackage',
lib='/home/my_user/R/x86_64-pc-linux-gnu-library/3.4',
repos='http://cran.rstudio.com/'
)
And this to add this path at the top of your R source
.libPaths(c(
.libPaths(),
"/home/my_user/R/x86_64-pc-linux-gnu-library/3.4/"
))
If you use Shiny you may have to edit the file /etc/R/Renviron
with R_LIBS_SITE
or R_LIBS_USER
in the file something like to R_LIBS_SITE=${R_LIBS_SITE-'/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library'}
. This for packages not optional for Shiny Server. For the others they could stay in your home user.
Thanks phili. I am not using Rstudio / shiny. I want only R and some R packages. Wanted to run R code directly without R studio
– Pat
Nov 15 '18 at 15:25
Except the last paragraph all I've said could be, and have to be, typed in simple R environment.
– phili_b
Nov 15 '18 at 18:49
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53321738%2fhow-to-install-rjdbc-package-on-ubuntu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try this to choose the installation path of the library (where my_user
is your user, 3.4
the version of R, my_package
is your package. Repos
is optional)
install.packages('mypackage',
lib='/home/my_user/R/x86_64-pc-linux-gnu-library/3.4',
repos='http://cran.rstudio.com/'
)
And this to add this path at the top of your R source
.libPaths(c(
.libPaths(),
"/home/my_user/R/x86_64-pc-linux-gnu-library/3.4/"
))
If you use Shiny you may have to edit the file /etc/R/Renviron
with R_LIBS_SITE
or R_LIBS_USER
in the file something like to R_LIBS_SITE=${R_LIBS_SITE-'/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library'}
. This for packages not optional for Shiny Server. For the others they could stay in your home user.
Thanks phili. I am not using Rstudio / shiny. I want only R and some R packages. Wanted to run R code directly without R studio
– Pat
Nov 15 '18 at 15:25
Except the last paragraph all I've said could be, and have to be, typed in simple R environment.
– phili_b
Nov 15 '18 at 18:49
add a comment |
Try this to choose the installation path of the library (where my_user
is your user, 3.4
the version of R, my_package
is your package. Repos
is optional)
install.packages('mypackage',
lib='/home/my_user/R/x86_64-pc-linux-gnu-library/3.4',
repos='http://cran.rstudio.com/'
)
And this to add this path at the top of your R source
.libPaths(c(
.libPaths(),
"/home/my_user/R/x86_64-pc-linux-gnu-library/3.4/"
))
If you use Shiny you may have to edit the file /etc/R/Renviron
with R_LIBS_SITE
or R_LIBS_USER
in the file something like to R_LIBS_SITE=${R_LIBS_SITE-'/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library'}
. This for packages not optional for Shiny Server. For the others they could stay in your home user.
Thanks phili. I am not using Rstudio / shiny. I want only R and some R packages. Wanted to run R code directly without R studio
– Pat
Nov 15 '18 at 15:25
Except the last paragraph all I've said could be, and have to be, typed in simple R environment.
– phili_b
Nov 15 '18 at 18:49
add a comment |
Try this to choose the installation path of the library (where my_user
is your user, 3.4
the version of R, my_package
is your package. Repos
is optional)
install.packages('mypackage',
lib='/home/my_user/R/x86_64-pc-linux-gnu-library/3.4',
repos='http://cran.rstudio.com/'
)
And this to add this path at the top of your R source
.libPaths(c(
.libPaths(),
"/home/my_user/R/x86_64-pc-linux-gnu-library/3.4/"
))
If you use Shiny you may have to edit the file /etc/R/Renviron
with R_LIBS_SITE
or R_LIBS_USER
in the file something like to R_LIBS_SITE=${R_LIBS_SITE-'/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library'}
. This for packages not optional for Shiny Server. For the others they could stay in your home user.
Try this to choose the installation path of the library (where my_user
is your user, 3.4
the version of R, my_package
is your package. Repos
is optional)
install.packages('mypackage',
lib='/home/my_user/R/x86_64-pc-linux-gnu-library/3.4',
repos='http://cran.rstudio.com/'
)
And this to add this path at the top of your R source
.libPaths(c(
.libPaths(),
"/home/my_user/R/x86_64-pc-linux-gnu-library/3.4/"
))
If you use Shiny you may have to edit the file /etc/R/Renviron
with R_LIBS_SITE
or R_LIBS_USER
in the file something like to R_LIBS_SITE=${R_LIBS_SITE-'/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library'}
. This for packages not optional for Shiny Server. For the others they could stay in your home user.
edited Nov 15 '18 at 15:14
answered Nov 15 '18 at 15:09
phili_bphili_b
9611
9611
Thanks phili. I am not using Rstudio / shiny. I want only R and some R packages. Wanted to run R code directly without R studio
– Pat
Nov 15 '18 at 15:25
Except the last paragraph all I've said could be, and have to be, typed in simple R environment.
– phili_b
Nov 15 '18 at 18:49
add a comment |
Thanks phili. I am not using Rstudio / shiny. I want only R and some R packages. Wanted to run R code directly without R studio
– Pat
Nov 15 '18 at 15:25
Except the last paragraph all I've said could be, and have to be, typed in simple R environment.
– phili_b
Nov 15 '18 at 18:49
Thanks phili. I am not using Rstudio / shiny. I want only R and some R packages. Wanted to run R code directly without R studio
– Pat
Nov 15 '18 at 15:25
Thanks phili. I am not using Rstudio / shiny. I want only R and some R packages. Wanted to run R code directly without R studio
– Pat
Nov 15 '18 at 15:25
Except the last paragraph all I've said could be, and have to be, typed in simple R environment.
– phili_b
Nov 15 '18 at 18:49
Except the last paragraph all I've said could be, and have to be, typed in simple R environment.
– phili_b
Nov 15 '18 at 18:49
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53321738%2fhow-to-install-rjdbc-package-on-ubuntu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Did you see any error messages? Try installing the package again, and copy the output of the command in your question.
– Scott Ritchie
Nov 15 '18 at 14:58
@ScottRitchie added
– Pat
Nov 15 '18 at 15:24
There has probably been an error during the installation; You may have seen something like "installation of... had non-zero exit status". If you post the output of that error message it may be possible to help.
– RHertel
Nov 15 '18 at 15:25
@Pat Your edit does not contain the complete / relevant part of the output.
– RHertel
Nov 15 '18 at 15:26
@RHertel I opened R console and typed
library()
I could see base packages installed. After that I did the above. After above steps I run library() again it gives me nothing except warning.– Pat
Nov 15 '18 at 15:28