New Swift Package Repository for Ubuntu/Debian Linux Distributions

supports ARMv7 Swift 5.1.5. … is the latest version of Swift currently available for 32bit devices.

Thank you. This is useful.

As soon as later versions are available I will add them to the repository.

Swift 5.1.5 was released on March 9, 2020, which is some time ago. Are there indications that any newer Swift 32-bit ARMv7 versions are in progress and might actual happen someday?

In my use case, Swift 5.2.x (or newer) would allow for a Vapor 4 webapp on an embedded SBC.

It would be interesting to know. It's a bit hard to judge by reading Issues · uraimo/buildSwiftOnARM · GitHub

Swift 5.6 is running fine on Armv7, for Debian, Buildroot and Yocto (Yocto layer not OSS yet). The Swift runtime libraries and packages need to be cross compiled from x86 or Arm64.


Swift 5.6 is running fine on Armv7

He was talking about running the Swift compiler itself on ARM SBCs, but you are only cross-compiling the stdlib for ARM. I just released a Swift 5.6.1 compiler for Android armv7, so it is doable, but I may be the only person still building the Swift toolchain for a 32-bit platform.


Is this problem known:

W: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

The following patch works for me:

---      2022-05-13 09:20:43.269871910 +0200
+++  2022-05-13 09:33:11.686579688 +0200
@@ -167,6 +167,12 @@
     # ----
+    # import the gpg key
+    echo -n "Deleting old swiftlang gpg key... "
+    apt-key del EF92AAA0 2> /dev/null
+    echo -n "Importing swiftlang gpg key... "
+    curl -L "${gpg_key_url}" 2> /dev/null | tee /etc/apt/trusted.gpg.d/swiftlang.asc &>/dev/null
+    echo "done."
     # run apt update
     echo -n "running update... "
     apt-get update > tmp_sources.txt
@@ -192,10 +198,6 @@
     echo -n "Installing apt-transport-https... "
     apt-get install -y apt-transport-https &> /dev/null
     echo "done."
-    # import the gpg key
-    echo -n "Importing swiftlang gpg key... "
-    curl -L "${gpg_key_url}" 2> /dev/null | apt-key add - &>/dev/null
-    echo "done."
     # user input
     if [ "${dist}" != "raspbian" ];
1 Like

@gonsolo thanks.
I am aware of this issue and will have an update ready soon. I also need to update the gpg key for other reasons so I am planning to do it all at the same time. This is also required for Debian Bullseye.
At this point it is just a warning so everything should still install ok in the mean time.

Your homepage said that it supports installation on Deepin.
However, the script doesn't think so:
Twitter 上的 このいとしき(子ノ糸志貴 :male_sign: この愛しき):"Sigh..." / Twitter

These are the manual installation steps for Deepin 20 (the same as Debian buster):

sudo apt update && sudo apt upgrade
sudo apt install curl ca-certificates gnupg
curl -fsSL | sudo gpg --dearmor -o /usr/share/keyrings/swiftlang_repo.gpg.key
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/swiftlang_repo.gpg.key] buster main" | sudo tee /etc/apt/sources.list.d/swiftlang.list > /dev/null
sudo apt update
sudo apt install swiftlang

@ShikiSuen, thanks for the info.
I have updated the install script to fix the Deepin 20 support. It will now add Deepin as Debian Buster compatible.



I know this is highly ephemeral, but just wanted to check if there is any rate limiting going on with the network connection and/or are you still speccing the HW/bandwidth requirements? I've downloaded 5.6 jammy deb package a few times now at decentish speeds, and the latest one is being throttled down to 50-70 kB/s (on a 100 mbps connection - confirmed with ? Or the usual, it's at my end :stuck_out_tongue:

Love that this repo exists though, much appreciated!

Hi Nik,
There is no rate limiting on the server. Just ran some tests and there doesn't appear to be any problems with connection speeds.
The server is also being used as the Swift package build server so connection speeds will vary depending current server load.
Let me know if your speed remains low.

Would it be possible to add Swift 5.7?

Or has the apt repository been replaced with something on (I couldn't find anything, but it seems that is a goal or at least some work is being done towards that)

@Karl , I am currently working on adding 5.7 and it should be available soon.


Hello @futurejones, thank you so much for your work and time on this. I am trying to install Swift on a BeagleBone Black with Debian 10.3
Once the finishes and I run
sudo apt install swiftlang
I get the following

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package swiftlang

The contents of my /etc/apt/sources.list.d/swiftlang-release.list file is:

deb [arch=armhf signed-by=/usr/share/keyrings/swiftlang_repo.gpg.key] buster v5_6

Any ideas of what could be going on?

hi @jonhoffman, it looks like you have an 32bit install of Debian that is looking for a 'arch=armhf' version of swift. Unfortunately the only 32bit version currently available is 5.1.5.
If you run the install script again and choose main section instead of v5_6 you should be able to install the 5.1.5 version.

WOW, thank you so much for the quick reply, I really appreciate it. I will try that tonight and see what I get. Any plans on supporting the latest releases of Swift for the 32 bit? I would really like to be able to run the latest Swift on the BeagleBone Black, but would I have to go with something like the BeagleBone AI-64 in order to get the latest Swift?

I would recommend moving to 64bit if you want the latest Swift.

1 Like

Hi everybody,
Swift-5.7-RELEASE is now in the repository.
Available for the following distributions in arm64/aarch64 and amd64/x86_64.

  • Debian 10 buster
  • Debian 11 bullseye
  • Ubuntu 18.04 bionic
  • Ubuntu 20.04 focal
  • Ubuntu 22.04 jammy

The repository has also been updated to support Ubuntu 22.10 'Kinetic' which will be released next month.