2

I am trying to install r-base in my just installed Ubuntu 14.04 system.

However, I get the following error (only last few lines of output is shown here):

0 upgraded, 70 newly installed, 0 to remove and 5 not upgraded.
Need to get 457 kB/71.9 MB of archives.
After this operation, 156 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Err http://in.archive.ubuntu.com/ubuntu/ trusty/universe r-cran-cluster amd64 1.14.4-1
  403  Forbidden [IP: 91.189.88.149 80]
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/universe/c/cluster/r-cran-cluster_1.14.4-1_amd64.deb  403  Forbidden [IP: 91.189.88.149 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I tried apt-get update, apt-get upgrade and apt-get update --fix-missing. Before fixing the missing files, I used to get a warning at the end of the apt-get update that some key is missing. However, using it with --fix-missing solved that error. But still there is error while installing r-base.

Through the Software Center, I get the same error with title: Failed to download package files, Check your internet connection. Error is as below.

Error: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/universe/c/cluster/r-cran-cluster_1.14.4-1_amd64.deb 403  Forbidden [IP: 91.189.91.26 80]

My internet connection is fine. When I try to open above link in browser, it says "access denied".

How can I get access? Or from where else can I find the same file? I am new to Ubuntu. I found some other problems of 403 forbidden error but none helped me and they were for different specific cases (not like mine).


UPDATE

Trying this link's deb file using dpkg gives output as below

darshil@darshil-Lenovo-G580:~/Downloads$ sudo dpkg -i r-cran-cluster_2.0.4-1trusty0_amd64.deb 
Selecting previously unselected package r-cran-cluster.
(Reading database ... 185096 files and directories currently installed.)
Preparing to unpack r-cran-cluster_2.0.4-1trusty0_amd64.deb ...
Unpacking r-cran-cluster (2.0.4-1trusty0) ...
dpkg: dependency problems prevent configuration of r-cran-cluster:
 r-cran-cluster depends on r-base-core (>= 3.2.5-1trusty0); however:
  Package r-base-core is not installed.
 r-cran-cluster depends on r-api-3; however:
  Package r-api-3 is not installed.

dpkg: error processing package r-cran-cluster (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 r-cran-cluster
0

2 Answers 2

1

Try to install r from CRAN. Add

deb http://cran.rstudio.com/bin/linux/ubuntu trusty/

to your /etc/apt/sources.list then add the key to archive

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

Then everything should be OK

sudo apt-get update
sudo apt-get install r-base r-recommended rstudio

P.S. Don't forget to update repository in sources.list after upgrading to a new version of Ubuntu. List of available versions and some setup instructions.

10
  • Did what you said. New error: E: Failed to fetch http://cran.rstudio.com/bin/linux/ubuntu/trusty/r-cran-cluster_2.0.4-1trusty0_amd64.deb 403 Forbidden E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? So basically the same error with CRAN as well. Again, when I open the above deb URL in browser, it shows access denied.
    – dc95
    Apr 29, 2016 at 20:00
  • @DarshilChauhan r-base cannot have missing packages on CRAN. Try sudo apt-get update --fix-missing and then try to install r-base again.
    – Slowpoke
    Apr 29, 2016 at 20:09
  • Nope, same result. I even tried adding deb http://stat.ethz.ch/CRAN/bin/linux/ubuntu trusty/ and adding its key and then updating and installing (Got it from askubuntu.com/questions/503270/…). Still it gives same error for this one also. What could be the cause of this? Could it be that my device or network is blocking this particular deb file? Can you try opening the deb URL in your browser?
    – dc95
    Apr 29, 2016 at 20:19
  • @DarshilChauhan While I googled it, I found that there is something strange with the filename. Try again this CRAN link. If it still doesn't work take it from here, but this is another build so it's not recommended. Install it manually with sudo dpkg -i PACKAGE_NAME.deb
    – Slowpoke
    Apr 29, 2016 at 20:25
  • I tried your other source, but when I run the deb file in the software center, it gives same error: Failed to fetch http://cran.rstudio.com/bin/linux/ubuntu/trusty/r-cran-cluster_2.0.4-1trusty0_amd64.deb 403 Forbidden Maybe because they are also using CRAN for that file? I also tried it using dpkg but that too didn't work. I will put entire output is in the update of the question. Any idea what might be causing this? Someone outside my network tried to go the deb files through browser but it showed "Not Found". I don't understand. What is going on?
    – dc95
    Apr 29, 2016 at 20:45
0

I finally figured out that it was my service provider's problem. For some reason the network at my institute was blocking this single file. So I installed r-base from terminal at another network (from another place) and it worked flawlessly!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .