Rohan
Rohan

Reputation: 477

Error with swift command in terminal in ubuntu 15.04

I installed the open sourced version of Swift from swift.org for Ubuntu 15.10, but I am running Ubuntu 15.04 in my machine. Now when I executed the swift command in the terminal it raising the following error.

swift/usr/bin/repl_swift:error while loading shared libraries: libicuuc.so.55: cannot open shared object file: No such file or directory

error: failed to stop process at REPL breakpoint

I ran the following command to ensure libicu52 is installed.

 sudo apt-get install libicu52

Please help me to sort out this problem. Thanks in advance.

Upvotes: 2

Views: 4657

Answers (5)

Florian Pfisterer
Florian Pfisterer

Reputation: 1265

For newer versions where it complains about libicuuc.so.57: cannot open shared object file (version 57), use the following:

sudo wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu57_57.1-6ubuntu0.3_amd64.deb
sudo dpkg -i libicu57_57.1-6ubuntu0.3_amd64.deb

In general, you can search here for the version you need.

Upvotes: 3

Before the 8th of December this used to work

echo "deb http://security.ubuntu.com/ubuntu xenial-security main" | sudo tee --
append /etc/apt/sources.list
sudo apt-get update
sudo apt-get install libicu55

Upvotes: 0

Niraj Pradhan
Niraj Pradhan

Reputation: 126

Try this one

wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu55_55.1-7_amd64.deb

sudo dpkg -i libicu55_55.1-7_amd64.deb

It worked for me

Upvotes: 5

Titi Wangsa bin Damhore
Titi Wangsa bin Damhore

Reputation: 7199

I tried this as well

apt-get install libicu-dev

It worked for me

Upvotes: 2

Anatoli P
Anatoli P

Reputation: 4891

You don't need libicu-dev unless you are building Swift from source. The problem is that, as pointed out by gengisdave, libicu52 is installed on the machine, but libicu55 is required. A few things you might try:

See if apt-get install libicu55 is going to install the needed version.

Install the binary distribution intended for Ubuntu 14.04. That one requires libicu52, which you do have on the system. This may or may not work, and if it does at first, it may break unexpectedly later depending on what you are doing.

This is even worse, but you might try it if you are just experimenting. Use dpkg -L libicu52 to find out where libicuuc.so.52 is located and create a symlink to it, named libicuuc.so.55, in the same directory.

Upvotes: 1

Related Questions