6

I am trying install gollum by gem on Ubuntu 14.10.

When I try to use gem install gollum, I see the error below:

/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
ERROR:  Error installing gollum:
    ERROR: Failed to build gem native extension.

    Building has failed. See above output for more information on the failure.
extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.1.0/gems/charlock_holmes-0.7.3 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/charlock_holmes-0.7.3/gem_make.out

I found out that libicu-dev is required.

So I use sudo apt-get install libicu-dev, but receive this error:

$ sudo apt-get install libicu-dev 
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:
 libicu-dev : Depends: libicu52 (= 52.1-6) but 52.1-6ubuntu0.3 is to be installed
E: Unable to correct problems, you have held broken packages.

I tried apt-get install -f, but the error remained as before.

How can I fix the problem? Thank you!

qubodup
  • 8,687
  • 5
  • 37
  • 45
mashpolo
  • 61
  • 1
  • 1
  • 6

2 Answers2

7
sudo apt install libicu52=52.1-6

sudo apt-get install libicu-dev

Install the required version. There will be a downgrade warning that you will need to confirm that looks like this:

The following packages will be DOWNGRADED:
  libicu52
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Need to get 7,643 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
qubodup
  • 8,687
  • 5
  • 37
  • 45
sanjivgupta
  • 396
  • 3
  • 12
  • 4
    While this code snippet may solve the question, [including an explanation](//meta.stackexchange.com/questions/114762/explaining-entirely-code-based-answers) really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion. Please also try not to crowd your code with explanatory comments, this reduces the readability of both the code and the explanations! – Filnor Jan 12 '18 at 08:59
  • I confirm this works on 14.10 with libicu55=55.1.7 (` libicu-dev : Depends: libicu55 (= 55.1-7) but 55.1-7ubuntu0.4 is to be installed`) – qubodup Feb 22 '20 at 14:13
  • I can confirm that it works with libicu67 [(= 67.1-7) but 67.1-6 ...] – gvegayon Aug 14 '21 at 00:09
0

You have to re-install this libicu, I solved this problem on ubuntu 22:

  1. apt purge libicu-dev libicu
  2. apt update
  3. apt install libicu-dev libicu
Siwei
  • 19,858
  • 7
  • 75
  • 95