问题 1:

问题 1:

我已阅读过类似的问题/指南:

我猜想他们给出的说明中有一些我遗漏的一般假设,因为我最终迷失了方向。

问题 1:

我正在运行 12.04,因此根据 CRAN 的指南,我应该

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

可以吗/etc/apt/sources.list?它可以放在任何空行上吗?还是我需要遵循一定的顺序?

问题2:

当我按照 CRAN 指南中的下一步操作时,我会进行更新和安装。我按照我理解的指南进行操作,但袜子里有“蓟”。我不知道出了什么问题。当我加载到 R 时,我仍然加载到 2.14。

XXXXXXXXXXXXXXx:~$ sudo apt-get update
Ign http://cran.cnr.Berkeley.edu quantal/ Release.gpg
Hit http://security.ubuntu.com precise-security Release.gpg                    
Hit http://us.archive.ubuntu.com precise Release.gpg                           
Get:1 http://us.archive.ubuntu.com precise-updates Release.gpg [198 B]         
Get:2 http://us.archive.ubuntu.com precise-backports Release.gpg [198 B]       
Ign http://cran.cnr.Berkeley.edu quantal/ Release                              
Hit http://security.ubuntu.com precise-security Release                        
Hit http://us.archive.ubuntu.com precise Release                               
Hit http://extras.ubuntu.com precise Release.gpg                               
Get:3 http://us.archive.ubuntu.com precise-updates Release [49.6 kB]           
Hit http://security.ubuntu.com precise-security/main Sources                   
Hit http://extras.ubuntu.com precise Release                                   
Hit http://security.ubuntu.com precise-security/restricted Sources             
Hit http://security.ubuntu.com precise-security/universe Sources               
Hit http://security.ubuntu.com precise-security/multiverse Sources             
Hit http://security.ubuntu.com precise-security/main amd64 Packages            
Hit http://security.ubuntu.com precise-security/restricted amd64 Packages      
Hit http://security.ubuntu.com precise-security/universe amd64 Packages        
Hit http://security.ubuntu.com precise-security/multiverse amd64 Packages      
Hit http://security.ubuntu.com precise-security/main i386 Packages             
Hit http://security.ubuntu.com precise-security/restricted i386 Packages       
Hit http://security.ubuntu.com precise-security/universe i386 Packages         
Get:4 http://us.archive.ubuntu.com precise-backports Release [49.6 kB]         
Hit http://security.ubuntu.com precise-security/multiverse i386 Packages       
Hit http://security.ubuntu.com precise-security/main TranslationIndex          
Hit http://security.ubuntu.com precise-security/multiverse TranslationIndex    
Hit http://security.ubuntu.com precise-security/restricted TranslationIndex    
Hit http://security.ubuntu.com precise-security/universe TranslationIndex      
Hit http://extras.ubuntu.com precise/main Sources                              
Hit http://us.archive.ubuntu.com precise/main Sources                          
Hit http://us.archive.ubuntu.com precise/restricted Sources                    
Hit http://us.archive.ubuntu.com precise/universe Sources                      
Hit http://us.archive.ubuntu.com precise/multiverse Sources                    
Hit http://us.archive.ubuntu.com precise/main amd64 Packages                   
Ign http://ppa.launchpad.net precise Release.gpg                               
Hit http://us.archive.ubuntu.com precise/restricted amd64 Packages             
Hit http://us.archive.ubuntu.com precise/universe amd64 Packages               
Hit http://us.archive.ubuntu.com precise/multiverse amd64 Packages             
Hit http://us.archive.ubuntu.com precise/main i386 Packages                    
Hit http://security.ubuntu.com precise-security/main Translation-en            
Hit http://security.ubuntu.com precise-security/multiverse Translation-en      
Hit http://security.ubuntu.com precise-security/restricted Translation-en      
Hit http://extras.ubuntu.com precise/main amd64 Packages                       
Hit http://extras.ubuntu.com precise/main i386 Packages                        
Ign http://extras.ubuntu.com precise/main TranslationIndex                     
Hit http://us.archive.ubuntu.com precise/restricted i386 Packages              
Hit http://us.archive.ubuntu.com precise/universe i386 Packages                
Hit http://us.archive.ubuntu.com precise/multiverse i386 Packages              
Hit http://us.archive.ubuntu.com precise/main TranslationIndex                 
Hit http://us.archive.ubuntu.com precise/multiverse TranslationIndex           
Hit http://us.archive.ubuntu.com precise/restricted TranslationIndex           
Hit http://security.ubuntu.com precise-security/universe Translation-en        
Ign http://ppa.launchpad.net precise Release                                   
Hit http://us.archive.ubuntu.com precise/universe TranslationIndex             
Get:5 http://us.archive.ubuntu.com precise-updates/main Sources [454 kB]       
Ign http://ppa.launchpad.net precise/main TranslationIndex                     
Get:6 http://us.archive.ubuntu.com precise-updates/restricted Sources [8,028 B]
Get:7 http://us.archive.ubuntu.com precise-updates/universe Sources [106 kB]   
Err http://cran.cnr.Berkeley.edu quantal/ Packages                             
  404  Not Found
Err http://ppa.launchpad.net precise/main Sources                              
  404  Not Found
Err http://ppa.launchpad.net precise/main amd64 Packages                       
  404  Not Found
Err http://ppa.launchpad.net precise/main i386 Packages                        
  404  Not Found
Ign http://cran.cnr.Berkeley.edu quantal/ Translation-en_US                    
Ign http://extras.ubuntu.com precise/main Translation-en_US                    
Ign http://cran.cnr.Berkeley.edu quantal/ Translation-en                       
Get:8 http://us.archive.ubuntu.com precise-updates/multiverse Sources [8,909 B]
Ign http://extras.ubuntu.com precise/main Translation-en                       
Get:9 http://us.archive.ubuntu.com precise-updates/main amd64 Packages [764 kB]
Ign http://ppa.launchpad.net precise/main Translation-en_US                   
Ign http://ppa.launchpad.net precise/main Translation-en
Get:10 http://us.archive.ubuntu.com precise-updates/restricted amd64 Packages [12.2 kB]
Get:11 http://us.archive.ubuntu.com precise-updates/universe amd64 Packages [239 kB]
Get:12 http://us.archive.ubuntu.com precise-updates/multiverse amd64 Packages [15.3 kB]
Get:13 http://us.archive.ubuntu.com precise-updates/main i386 Packages [788 kB]
Get:14 http://us.archive.ubuntu.com precise-updates/restricted i386 Packages [12.2 kB]
Get:15 http://us.archive.ubuntu.com precise-updates/universe i386 Packages [244 kB]
Get:16 http://us.archive.ubuntu.com precise-updates/multiverse i386 Packages [15.4 kB]
Hit http://us.archive.ubuntu.com precise-updates/main TranslationIndex         
Hit http://us.archive.ubuntu.com precise-updates/multiverse TranslationIndex   
Hit http://us.archive.ubuntu.com precise-updates/restricted TranslationIndex   
Hit http://us.archive.ubuntu.com precise-updates/universe TranslationIndex     
Get:17 http://us.archive.ubuntu.com precise-backports/main Sources [4,850 B]   
Get:18 http://us.archive.ubuntu.com precise-backports/restricted Sources [14 B]
Get:19 http://us.archive.ubuntu.com precise-backports/universe Sources [37.8 kB]
Get:20 http://us.archive.ubuntu.com precise-backports/multiverse Sources [5,311 B]
Get:21 http://us.archive.ubuntu.com precise-backports/main amd64 Packages [6,183 B]
Get:22 http://us.archive.ubuntu.com precise-backports/restricted amd64 Packages [14 B]
Get:23 http://us.archive.ubuntu.com precise-backports/universe amd64 Packages [39.2 kB]
Get:24 http://us.archive.ubuntu.com precise-backports/multiverse amd64 Packages [5,206 B]
Get:25 http://us.archive.ubuntu.com precise-backports/main i386 Packages [6,182 B]
Get:26 http://us.archive.ubuntu.com precise-backports/restricted i386 Packages [14 B]
Get:27 http://us.archive.ubuntu.com precise-backports/universe i386 Packages [39.0 kB]
Get:28 http://us.archive.ubuntu.com precise-backports/multiverse i386 Packages [5,178 B]
Hit http://us.archive.ubuntu.com precise-backports/main TranslationIndex       
Hit http://us.archive.ubuntu.com precise-backports/multiverse TranslationIndex 
Hit http://us.archive.ubuntu.com precise-backports/restricted TranslationIndex 
Hit http://us.archive.ubuntu.com precise-backports/universe TranslationIndex   
Hit http://us.archive.ubuntu.com precise/main Translation-en                   
Hit http://us.archive.ubuntu.com precise/multiverse Translation-en             
Hit http://us.archive.ubuntu.com precise/restricted Translation-en             
Hit http://us.archive.ubuntu.com precise/universe Translation-en               
Hit http://us.archive.ubuntu.com precise-updates/main Translation-en           
Hit http://us.archive.ubuntu.com precise-updates/multiverse Translation-en     
Hit http://us.archive.ubuntu.com precise-updates/restricted Translation-en     
Hit http://us.archive.ubuntu.com precise-updates/universe Translation-en       
Hit http://us.archive.ubuntu.com precise-backports/main Translation-en         
Hit http://us.archive.ubuntu.com precise-backports/multiverse Translation-en   
Hit http://us.archive.ubuntu.com precise-backports/restricted Translation-en   
Hit http://us.archive.ubuntu.com precise-backports/universe Translation-en     
Fetched 2,916 kB in 21s (135 kB/s)                                             
W: Failed to fetch http://cran.cnr.Berkeley.edu/CRAN/bin/linux/ubuntu/quantal/Packages  404  Not Found

W: Failed to fetch http://ppa.launchpad.net/chromium-daily/ppa/ubuntu/dists/precise/main/source/Sources  404  Not Found

W: Failed to fetch http://ppa.launchpad.net/chromium-daily/ppa/ubuntu/dists/precise/main/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://ppa.launchpad.net/chromium-daily/ppa/ubuntu/dists/precise/main/binary-i386/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
XXXXXXXXXXXXXXXx:~$ sudo apt-get install r-base
Reading package lists... Done
Building dependency tree       
Reading state information... Done
r-base is already the newest version.
The following packages were automatically installed and are no longer required:
  efibootmgr gir1.2-ubuntuoneui-3.0 libubuntuoneui-3.0-1
  thunderbird-globalmenu
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

答案1

看来我的第一个问题的答案是肯定的,只需将该行放在文档中的任何位置即可。

虽然我不太清楚它是如何工作的,但按照
https://stackoverflow.com/questions/16093331/how-to-install-r-version-3-0对我有用。

然后,我在使依赖包正常工作时遇到了问题,您可以阅读以下内容: https://stackoverflow.com/questions/23047700/trouble-installing-shiny-dependencies-on-ubtuntu-12-04-to-host-apps-on-shiny-ser

相关内容