fmolino
fmolino

Reputation: 11

Failure to install kernlab package R.

I know other people have asked this question... but no one has really offered a solution.

I am trying to install the Kernlab R package, and I get this:

.....

install.packages("kernlab")
Installing package into ‘C:/Users/Owner/Documents/R/win-library/3.0’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.0/kernlab_0.9-19.zip'
Content type 'application/zip' length 2029405 bytes (1.9 Mb)
opened URL
downloaded 1.9 Mb

Warning in install.packages :
  downloaded length 1978368 != reported length 2029405
Warning in install.packages :
  error 1 in extracting from zip file
Warning in install.packages :
  cannot open compressed file 'kernlab/DESCRIPTION', probable reason 'No such file or directory'
Error in install.packages : cannot open the connection

........

I tried downloading the zip file and opening it from the computer, but it says that the files from the CRAN repository are corrupted. I tried winrar, unzipping the folder, etc.

I have to use this for the Data Analysis Coursera course and posted the question there. No one has answered yet.

Does anyone know what might be the problem?

Thanks in advance, Felipe

Upvotes: 1

Views: 11931

Answers (7)

fmolino
fmolino

Reputation: 11

I actually fixed this one eventually... My laptop at the time had a really weird virus that wouldn't let me install anything, even packages.

It was a really old laptop, but I basically removed the virus from the PC, and I got it work.

Upvotes: 0

shf8888
shf8888

Reputation: 275

I have run into similar issues in the past. This error can occur when the "login" information is unset for R, in which case you may not have the right permissions for /tmp/ What does your Sys.info() response look like? If you have login as "unknown", you can get said permission errors. Example:

                                   sysname 
                                   "Linux" 
                                   release 
                                 <release>
                                   version 
                             <version info>
                                  nodename 
                                    <nodename> 
                                   machine 
                                  "x86_64" 
                                     login 
                                   "unknown"
                                      user 
                                   <your name> 
                            effective_user 
                                   <your name> 

You can set the login through making sure R is being passed the correct user / uid. You can often set this info in .conf files for tools such as Rstudio, Rserve, etc.

Upvotes: 0

Kingz
Kingz

Reputation: 5286

I just tried installing in RStudio; it works fine:

install.packages("kernlab")

Here is my version of RStudio:

Version 0.99.489 – © 2009-2015 RStudio, Inc.
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/601.6.17 (KHTML, like Gecko)

Upvotes: 0

Darren Culbreath
Darren Culbreath

Reputation: 1

Had this issue on EC2

Installed after I made a few links.

R version 3.2.2 (2015-08-14) -- "Fire Safety" Copyright (C) 2015 The R Foundation for Statistical Computing Platform: x86_64-redhat-linux-gnu (64-bit)

ln -s /usr/lib64/R/modules/lapack.so /usr/lib64/R/lib/libRlapack.so

ln -s /usr/lib64/libblas.so /usr/lib64/R/lib/libRblas.so

ln -s /usr/lib64/libgfortran.so.3.0.0 /usr/lib64/R/lib/libgfortran.so

ln -s /usr/lib64/libquadmath.so.0.0.0 /usr/lib64/R/lib/libquadmath.so

Upvotes: 0

user3361365
user3361365

Reputation: 11

I downloaded from https://cran.r-project.org/web/packages/kernlab/index.html and unrar in: Documents Folder\R\win-library\3.2\kernlab and ready.

Upvotes: 1

Noha Elprince
Noha Elprince

Reputation: 1934

To install kernlab package: Download the kernlab binaries for your OS. Then open a terminal and type:

$R CMD INSTALL kernlab_0.9-19.tar

Then go to R and use it directly by issuing the command:

library(kernlab)

Upvotes: 3

shreya jain
shreya jain

Reputation: 48

I faced the same issue, tried installing the package on the R console and not R studio and then use the package in R studio. Now sure why or how it works, but it worked for me.

Upvotes: 0

Related Questions