Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I tried to install ruby on my ubuntu 10.04 server edition

sudo apt-get install ruby

I get the following error

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  ruby: Depends: ruby1.8 but it is not going to be installed
E: Broken packages
share|improve this question

1 Answer 1

I believe your problem is due to obsolete information your package manager has. I.e. it knows that ruby package depends on ruby1.8 package, but when it tries to install the latter, it can't find it in the repositories.

This is because Ruby in Lucid Lyx has been updated to version 1.9.1 since Lucid Lynx was released: http://packages.ubuntu.com/lucid/ruby/

So you need to update the information used by the package manager:

sudo apt-get update

Then you can install ruby:

sudo apt-get install ruby

You'll get version 1.9.1

(also, consider applying security updates and bug fixes using sudo apt-get upgrade - at the moment your system is likely lacking 2 years worth of security updates)

share|improve this answer
    
Thanks for the reply. I tried installing ruby using aptitude instead of apt-get, and it works. I tried what you have said. i tried sudo apt-get upgrade and i see all are update to date. I have also updated by package-manager. I see something intresting. i see an update available for ruby version "1.8.7.357-1~lucid+1". the current version i have is ruby "1.8.7.256-1~lucid+1". and if i upgrade now it works. –  Surya Feb 10 '12 at 4:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.