Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

swift build error on ubuntu 15.10

I am trying to install vapor (https://github.com/vapor/vapor) toolbox on a server which is running Ubuntu 15.10 x64.

I am getting this error from the "swift build" command

/swift-3.0/usr/bin/swift-build: error while loading shared libraries:    libcurl.so.4: cannot open shared object file: No such file or directory

Is this a curl issue? How can I resolve this error?

Details:

I am following the steps described here: https://vapor.github.io/documentation/getting-started/install-toolbox.html

Swift 3.0 has been installed:

user@server:~$ swift --version
Swift version 3.0 (swift-3.0-RELEASE)
Target: x86_64-unknown-linux-gnu

To install the toolbox:

user@server:~$ curl -sL toolbox.vapor.sh | bash

✅  Compatible
Downloading...
Compiling...
/swift-3.0/usr/bin/swift-build: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
Installing...
bash: line 22: .build/release/Executable: No such file or directory
Use vapor --help and vapor <command> --help to learn more.

The error above happens at this line in the script: swift build -c release > /dev/null;

swift build --help gives this same error:

user@server:~$ swift build --help
/swift-3.0/usr/bin/swift-build: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

vapor is not present:

user@server:~$ vapor --help
vapor: command not found

Also curl info:

user@server:~$ sudo -i curl --version
curl 7.43.0 (x86_64-pc-linux-gnu) libcurl/7.43.0 GnuTLS/3.3.15 zlib/1.2.8 libidn/1.28 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets 

curl was installed with sudo apt-get install curl and did not report any errors.

user@server:/usr/lib$ find . | grep curl reports about 15 matches but none are exactly libcurl.so.4. The closes matches are:

./x86_64-linux-gnu/libcurl-gnutls.so.4
./x86_64-linux-gnu/libcurl-gnutls.so.4.3.0
./x86_64-linux-gnu/libcurl-gnutls.so.3
like image 718
Rob MacMillian Avatar asked Oct 02 '16 01:10

Rob MacMillian


1 Answers

This issue was resolved by running:

user@server:$ sudo apt-get install libcurl3

like image 107
Rob MacMillian Avatar answered Dec 02 '22 08:12

Rob MacMillian