Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4233568
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:14:10+00:00 2026-05-21T02:14:10+00:00

I am just getting started with Ubuntu and want to program in R. I

  • 0

I am just getting started with Ubuntu and want to program in R. I successfully installed the latest version of R (currently 2.12.2) from the terminal. I then attempted to run the following command:

> install.packages("XML")
Installing package(s) into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning in install.packages("XML") :
  'lib = "/usr/local/lib/R/site-library"' is not writable
Would you like to create a personal library
'~/R/i686-pc-linux-gnu-library/2.12'
to install packages into?  (y/n) 

Should I create the personal directory or did I miss a step somewhere that allows me to write to the site library.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T02:14:11+00:00Added an answer on May 21, 2026 at 2:14 am

    The comment by sarnold is quite correct. In the Debian (and hence Ubuntu) package, the directory /usr/local/lib/R/site-library/ is created by the file /var/lib/dpkg/info/r-base-core.postinst script — and the relevant code is:

    # edd 03 Apr 2003  cf Section 10.1.2 of Debian Policy
    if [ ! -e /usr/local/lib/R ]; then
      if mkdir /usr/local/lib/R 2>/dev/null; then
        chown root:staff /usr/local/lib/R
        chmod 2775 /usr/local/lib/R
      fi
    fi
    if [ ! -e /usr/local/lib/R/site-library ]; then
      if mkdir /usr/local/lib/R/site-library 2>/dev/null; then
        chown root:staff /usr/local/lib/R/site-library
        chmod 2775 /usr/local/lib/R/site-library
      fi
    fi
    

    so the directory is owned by root:staff and of mode 2775, or ‘user and group read-write, others read-only’.

    So to write there, you have two basic choices:

    1. Always use sudo or become root which is clumsy.

    2. Add yourself to the group staff. There is probably a user-friendly GUI for it; I am Unix old-school and do that by hand by editing /etc/group and /etc/gshadow — after that you can install directly (well you need a fresh shell to have those rights, or just start a new terminal). You can of course also pick a different group, or create one, but then you need to also alter the directory tree in /usr/local/lib/R/ accordingly.

    Hope this helps. The r-sig-debian list is a friendly place for Debian/Ubuntu questions like this and I recommend it. The question has come up there before.

    Edit: Also, a fair number of (more complicated) packages are part of Ubuntu / Debian, so to get XML you can just to sudo apt-get install r-cran-xml. Do an apt-cache search r-cran to see what is available.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im just getting started on maven, and im currently following the article from http://www.sonatype.com/books/mvnex-book/reference/simple-project-sect-create-simple.html
Just getting started with db2. Quick question about giving it SQL commands from a
I recently just installed Eclipse onto a Ubuntu 10.04 machine. Now, I'm reading Getting
Just getting started with Dojo. I want to pass a couple of custom parameters
Just getting started with WF4. Ran into a problem with passing some text from
I am just getting started with Bootstrap from Twitter and am wondering what the
I'm just getting started with Sinatra. I'm running Ruby 1.9.2 on Ubuntu. After my
Just getting started with Linq to SQL so forgive the newbie question. I'm trying
Just getting started using MVC in ASP.NET, I'm going to have it so users
Just getting started with C++ here. I am working on OSX with Eclipse CDT.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.