1

When I install a new package, I get these error messages:

$ sudo apt-get install jetty
Reading package lists... Done
Building dependency tree       
Reading state information... Done
jetty is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 198 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up ruby1.9.1 (1:1.9.3.551-2bbox1~trusty1) ...
update-alternatives: error: alternative gem.1.gz can't be slave of gem: it is a slave of ruby
dpkg: error processing package ruby1.9.1 (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 ruby1.9.1
E: Sub-process /usr/bin/dpkg returned an error code (1)

And I do not know how to fix it.

Ubuntu User
  • 317
  • 2
  • 17
Mohamed KALLEL
  • 487
  • 8
  • 21
  • What's your Ubuntu release? Your third-party Ruby package from a PPA is incompatible with a different Ruby package provided by Canonical. You can either use the `ruby` package or, if you need the v1.9 branch, save yourself the headache and use `rvm` to install and manage different Ruby versions. See [How do I install ruby-rvm?](/q/128966/175814) and specifically [this answer](/a/551920/175814). – David Foerster Feb 06 '17 at 18:55
  • Similar issue has been discussed here http://askubuntu.com/questions/688338/e-sub-process-usr-bin-dpkg-returned-an-error-code-1-related-to-google-chrom --Regenerate a new sources list – Hope Feb 06 '17 at 17:54

0 Answers0