Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-2743] Incomplete install instructions for Ubuntu #45347

Open
Bouke opened this issue Sep 23, 2016 · 11 comments
Open

[SR-2743] Incomplete install instructions for Ubuntu #45347

Bouke opened this issue Sep 23, 2016 · 11 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. † website This issue was supposed to belong in the swift-org-website repository

Comments

@Bouke
Copy link
Contributor

Bouke commented Sep 23, 2016

Previous ID SR-2743
Radar None
Original Reporter @Bouke
Type Bug
Environment

Swift 3.0 GM, Swift 4.0.2

Additional Detail from JIRA
Votes 9
Component/s
Labels Bug, Website
Assignee None
Priority Medium

md5: c299a808f90d17978665ba28d5c425ac

relates to:

  • SR-2744 Errors when running REPL on Ubuntu 16.04

Issue Description:

If the package libpython2.7-dev is not installed, the following error is thrown when running swift:

...swift/usr/bin/lldb: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory

This was on both a fresh Ubuntu server 14.04 and 16.04, with OpenSSH in addition to the default options. Solution; the installation instructions on the site should also instruct to install libpython2.7-dev.

Update: Additionally, if libcurl3 is not installed, which it isn't by default on Ubuntu Server, then a different and more cryptic error may occur: the REPL may emit "error: Couldn't lookup symbols" errors when trying to import Foundation and other libraries. Unlike the libpython error, this one gives no clue as to what is missing. (See SR-2744 for full details.)

@belkadan
Copy link
Contributor

@trfiala, do we really need libpython-dev or can we get away with a non-dev package?

@swift-ci
Copy link
Collaborator

Comment by Mason Mark (JIRA)

On a fresh installation of Ubuntu 16.04, installing the non-dev libpython2.7 package fixed this issue for me:

sudo apt-get install libpython2.7

(Using Swift 3.0.2.)

@swift-ci
Copy link
Collaborator

swift-ci commented Mar 1, 2017

Comment by Valdimar Bjorn Asgeirsson (JIRA)

In addition to the above, I found that I needed to install libcurl3 in order to get swift 3.0.2 to run on Ubuntu LTS 16.04.2.

sudo apt-get install libcurl3

@swift-ci
Copy link
Collaborator

swift-ci commented May 6, 2017

Comment by efe ertugrul (JIRA)

Same issue here.
On a fresh installation of ubuntu16.04.
After installed swift-3.1.1-RELEASE-ubuntu16.04 i get the same error.

sudo apt-get install libpython2.7-dev
Worked for me

@Bouke
Copy link
Contributor Author

Bouke commented Aug 27, 2017

Can we at least update the website's install instructions? We still depend on libpython2.7 and libcurl3 on Ubuntu 16.04.

@swift-ci
Copy link
Collaborator

Comment by Michael Koukoullis (JIRA)

This is still an issue, an update to the website instructions would be helpful. The following four packages are required to get Swift 4.0.3 running on Ubuntu 16.04

apt-get -y install clang libicu-dev libpython2.7 libcurl3

@swift-ci
Copy link
Collaborator

swift-ci commented Apr 5, 2018

Comment by Addison Webb (JIRA)

This is still an issue for Swift 4.1 (swift-4.1-RELEASE) running on Ubuntu 16.04. Updated documentation on Swift.org would be nice 🙂

@swift-ci
Copy link
Collaborator

Comment by Dawei (JIRA)

Just ran into this trying to install Swift 4.2-DEVELOPMENT-SNAPSHOT....on Ubuntu 16.04

@swift-ci
Copy link
Collaborator

Comment by Tim Nelson (JIRA)

Just ran into the same error:
...swift/usr/bin/lldb: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
This happened on fresh installs of:

Ubuntu 16.04.5

swift-4.1.3-RELEASE-ubuntu16.04.tar

Installing libpython2.7-dev fixed the issue for me. Only after did I see in the comments that installing libpython2.7 would maybe fix it as well. No issues here needing to install libcurl3 so maybe that was fixed?

@swift-ci
Copy link
Collaborator

Comment by Michael Koukoullis (JIRA)

FWIW this is a bash script I use to provision Ubuntu machines in AWS so they can run Swift https://github.com/kouky/swift-aws-ec2/blob/master/user-data.sh

The broader context for that bash script is a terraform recipe for getting Swift up and running on AWS, checkout the README in the repo https://github.com/kouky/swift-aws-ec2

@swift-ci
Copy link
Collaborator

Comment by Tony Grue (JIRA)

In addition to libpython2.7-dev I found I also needed libcurl4 for Swift 4.2.3 which has changed since Michael's post above.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. † website This issue was supposed to belong in the swift-org-website repository
Projects
None yet
Development

No branches or pull requests

3 participants