0

I run the command to install all about ruby : sudo apt-get install ruby-* .But it shows unmet dependencies / broken packages.

See Terminal ScreenShot Here

Now tell me how to install all the packages who met dependencies (satisfied).

Anwar
  • 75,875
  • 31
  • 191
  • 309
Chitholian
  • 165
  • 2
  • 12
  • Try `sudo apt-get update –fix-missing` – GrannySez Oct 13 '16 at 02:54
  • 4
    This may help: [Unable to correct problems, you have held broken packages.](http://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages) – TheOdd Oct 13 '16 at 03:00
  • @OwenHines I think this is not a dupe. There are other reason when `ruby-*` may fail. Check my answer – Anwar Oct 13 '16 at 08:26
  • 1
    Please consider providing text outputs instead of screenshots. It helps finding the question and improves formatting. Thanks – Anwar Oct 13 '16 at 08:33
  • @Anwar I didn't report it as a dupe, I only suggested a different answer that could have solutions. – TheOdd Oct 13 '16 at 12:32
  • @OwenHines People close voting to that question now :) – Anwar Oct 13 '16 at 12:33

1 Answers1

7

When you try to install using ruby-*, that regex will be expanded to include all packages starting with name ruby. But that will only succeed if all packages starting with ruby don't conflict each other or can stay together happily.

The problem is, some packages with name starting with ruby can conflict with some other packages matched by the regex. For example, when I execute that command in my system (Ubuntu 16.04), one of the conflicts was -

ruby-celluloid-fsm : Breaks: ruby-celluloid (< 0.17~) but 0.16.0-4 is to be installed

Here ruby-celluloid-fsm conflicting with ruby-celluoid. I thought one of them is older than the other and the newer one replaces older one and can't stay together. Indeed this was the case when I checked with apt-cache depends ruby-celluloid-fsm command. Here is the output

→ apt-cache depends ruby-celluloid-fsm 
ruby-celluloid-fsm
  Depends: bundler
 |Depends: ruby
  Depends: <ruby-interpreter>
    ruby2.0:i386
    ruby2.0
    ruby2.1
    ruby2.2
    jruby
    ruby1.9.1
  Depends: ruby-dotenv
  Depends: ruby-nenv
  Depends: ruby-rspec-logsplit
  Depends: ruby-timers
  Breaks: ruby-celluloid
  Replaces: ruby-celluloid

You can clearly see that the package conflicts with ruby-celluoid, indicated by the Breaks: and Replaces: line.

So, don't install anything with * regex pattern, it can fail dramatically. You should only install packages what you need. Remember, Not all packages in official repo can be installed in a system together.

Anwar
  • 75,875
  • 31
  • 191
  • 309