New Swift Package Repository for Ubuntu/Debian Linux Distributions

@Sven Hi,
Can you post an example of what you think the ldconfig file should contain and why it would be needed?

Simple one would be:

$ cat /etc/ 

The problem is that if another Swift package builds the binaries (i.e Docker container), a system with the .deb packages won't be able to find these:

ldd my-binary | grep "not found" => not found => not found => not found => not found => not found => not found => not found

I think a link to /usr/libexec/swift/bin/swift-demangle can safely be put into /usr/bin.

All swift-prefixed tools should be accessible by swift <toolname>, so there’s no need to expose them explicitly.

1 Like

Ok. Thanks.

Swift 5.7.2 Package Update and Fixes

Hi everybody,
The recent moving of the installation directory to /usr/libexec/swift/ for swift-5.7.2-RELEASE has created an issue with backwards compatibility with projects compiled on previous swift installations in the /usr directory.
This was highlighted in a post by @Sven. (thanks)

As fixing this required all the packages to be rebuilt and updated I have taken this opportunity to fix other issues and add some improvements.

New LibSwiftlang Package Dependency

Going forward the swiftlang package will now comprise of 2 separate packages.

  • swiftlang
  • libswiftlang

The main swiftlang package requires libswiftlang as a dependency and it will be automatically installed when swiftlang is installed.

The libswiftlang package replaces the old swiftlang-slim package and can be installed on its own when you just require the swift runtime.

ldconfig config fix

The new libswiftlang package fixes the ldconfig issue by adding a new swiftlang.conf file containing the path to the new installation directory.
This allows the new libswiftlang (swift runtime) package to be used with projects built with new swiftlang package, previous packages, and the official tar.gz and docker installations.


I have done considerable testing on installation and upgrading of all the packages, but as the number of changes is large, I may have missed something, so please let me know if you are having any issues.



Swift 5.7.3 Repository Update

Hi everybody,
The Apt Repository has been updated with the latest swift-5.7.3-RELEASE.


Swift Community Apt Repository Update

Hi everybody,
The Apt Repository has been updated with the latest Swift version and support for Ubuntu 23.04 lunar.

Swift 5.8 Release

The repository has been updated with the Swift 5.8 release.
This has required adding a new v5_7 section to the repository and updating the quick install script.

The main section will now provide swift-5.8.* releases and the new v5_7 section will provide swift-5.7.*

The quick install script menu has been updated with the new section.

--------------- Choose Swift Release Version ---------------

 If you always want to have the latest release/stable version of Swift available choose [1],
 or you can choose the Swift version most suitable for your project.
 The latest release/stable version of Swift in this repository is currently 5.8 


  1) latest/main - This will update to the latest release/stable version of Swift available
  2) Swift version 5.4.* - this will update to the latest point/patch release of Swift 5.4
  3) Swift version 5.5.* - this will update to the latest point/patch release of Swift 5.5
  4) Swift version 5.6.* - this will update to the latest point/patch release of Swift 5.6
  5) Swift version 5.7.* - this will update to the latest point/patch release of Swift 5.7


Enter number [1/2/3/4/5] : 

Ubuntu 23.04 Lunar Support

The repository has been updated to fully support the latest Ubuntu Lunar release with swift 5.7.3 and swift 5.8
Ubuntu Lunar has some great improvements and will be released on 20th April.
Beta versions are available now.

Support the Repository

If you would like help support the repository you can make donations at



FYI: Running /usr/libexec/swift/bin/lldb -P results in the following error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'lldb.embedded_interpreter'

Running /usr/bin/swift --version:

Swift version 5.8 (swift-5.8-RELEASE)
Target: x86_64-unknown-linux-gnu

Running /usr/bin/python --version:

Python 3.11.2

It seems that system python packages are installed in /usr/lib/python3/dist-packages and there is no directory /usr/libexec/swift/local/lib.

Can you give me some details on your OS and Version?
It looks like from the python version 3.11.2 that you maybe running Ubuntu 23.04.

Running /usr/libexec/swift/bin/lldb -P should return the same python version as the installed version - e.g. /usr/libexec/swift/local/lib/python3.11/dist-packages

Run cat /etc/apt/sources.list.d/swiftlang-release.list and make sure it has the correct OS version information.
e.g.deb [arch=amd64 signed-by=/usr/share/keyrings/swiftlang_repo.gpg.key] lunar main

Ubuntu 23.04.

/etc/apt/sources.list.d/swiftlang-release.list was indeed referring to the wrong release (I upgraded recently), kinetic. I fixed that and a sudo apt upgrade installed the lunar swiftlang version.

I still got the following (slightly different) error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'lldb'

After installing python3-lldb-13 running lldb works. I believe there is a missing dependency.

Running lldb on a real program however crashes:

Swift Community Apt Repository Update

Hi everybody,

Swift 5.8.1

The Apt Repository has been updated with the latest Swift 5.8.1 version.

Debian 12 Bookworm

Support for the latest Debian release 12 / Bookworm has been added to the repository.

Usage Statistics

The repository has been running for 2 years now and has close to 10,000 monthly users!
There are around 80GB of packages downloaded a month which is about 270 new swift installs.
The most popular OS / Version is Ubuntu / Jammy followed closely by Debian / Bullseye

Thank you to everybody who is supporting this repository


Seems the TLS certificate for expired:

Can we expect a fix?

@maartene , thanks for the notification.
Should be all fixed now.


Yes, awesome!

Hi Everybody,

The Swift Community Apt Repository will be offline until further notice while I reassess the viability of continuing.
Thank-you to everyone who has supported this project.



Huh? Did anything happen?

Just a guess, but I’d assume that the bandwidth costs vastly outstripped any donations received.

With the announcement of Swiftly it would be great if the Swift project supported .Debs for more distros than Amazon Linux or CentOS. Personally, I’d like whatever needs to be done to support Raspberry Pi OS (which, I assume is basically Debian).

Support for installing Swift on that OS would be a great boost to the idea that Swift isn’t just for developing for Apple hardware. The Pi hobbyist community is relatively large and prominent. It could be a great promotional tool for Swift.


Sad to hear.

Is it possible to share the scripts that where doing the packaging and creating the .deb files?

I've been working on packaging Swift for Debian. To date getting the copyright information correct has been the only noteworthy holdup. Twice now the package has sat in queue for multiple months only to have it get rejected by the Debian FTP master team when they find files that I had not located and make note of in the debian/copyright file. Much of the code used by the Swift project claims to be licensed under Apache-2.0, but when you dig into the files that they use there are actually 16 other licenses being used and each file much be correctly attributed. The copyright file now surpasses 1000 lines.

Packaging for a distribution isn't just about building it and getting it on the mirrors. Most of the work is in massaging it to comply with the guidelines and requirements of that distribution. If you want Swift to see wider adoption then push to upstream the Swift specific changes to llvm and clang to start with. Packaging Swift's version of LLVM is 90% of my copyright nightmare.

Soon Swift will be back into the queue for a third try to get onto Debian. Hopefully third time the charm. Hold fast.

If you want the scripts needed to make your own .deb files then feel free to use these: pkg-llvm / swiftlang · GitLab