[DSR] - Ubuntu 24.04 x64
Name of the Distribution
Ubuntu
Version of the Distribution
24.04
Package Types
- [X] Deb
- [ ] RPM
- [ ] Tar.gz
- [ ] Snap - Stop! Please file your issue in PowerShell-Snap instead.
Processor Architecture
x64
.NET Core Support
- [X] The version and architecture of the Distribution is supported by .NET Core.
Distribution Requirements
- [X] The version of the Distribution is supported for at least one year.
- [X] The version of the Distribution is not an interim release or equivalent.
Exemption Justification
No response
Progress
- [ ] An issue has been filed to create a Docker image in PowerShell-Docker
For PowerShell Team ONLY
- [ ] Docker image created
- [ ] Docker image published
- [ ] Distribution tested
- [ ] Update
packages.microsoft.comdeployment - [ ] Lifecycle updated
- [ ] Documentation Updated
dpkg: dependency problems prevent configuration of powershell: powershell depends on libicu72 | libicu71 | libicu70 | libicu69 | libicu68 | libicu67 | libicu66 | libicu65 | libicu63 | libicu60 | libicu57 | libicu55 | libicu52; however:
Can we increase the libicu dependency to the number 80 (libicu80), or a version for the next 2 years?
Don't use this approach. See following comments.
sudo dpkg --install --ignore-depends=libicu72 powershell_7.4.2-1.deb_amd64.deb
Following assumes curl and jq is installed and is running with root permissions. But I didn't like ignoring the dependency on an internationalization package. Since libicu72 package name has the version in the name, you can install multiple versions of it at the same time. So I just installed libicu72 package before installing powershell.
tmpDir=$(mktemp -d)
curl -sSL 'https://launchpad.net/ubuntu/+archive/primary/+files/libicu72_72.1-3ubuntu3_amd64.deb' -o "$tmpDir/libicu72_72.1-3ubuntu3_amd64.deb"
dpkg -i "$tmpDir"/libicu72_72.1-3ubuntu3_amd64.deb
downloadUrl=$(curl -sSL "https://api.github.com/repos/PowerShell/PowerShell/releases/latest" |
jq -r '[.assets[] | select(.name | endswith("_amd64.deb")) | .browser_download_url][0]')
curl -sSL "$downloadUrl" -o "$tmpDir/powershell.deb"
dpkg -i "$tmpDir"/powershell.deb
But I didn't like ignoring the dependency on an internationalization package. Since libicu72 package name has the version in the name, you can install multiple versions of it at the same time. So I just installed libicu72 package before installing powershell.
Thank you. my attempt didn't really hold up under scrutiny :) (following apt installs failed because of missing dependencies on powershell).
Don't use this approach. See following comments.
sudo dpkg --install --ignore-depends=libicu72 powershell_7.4.2-1.deb_amd64.deb
As noted above --ignore-depends will cause issues and apt-get -f install will try to remove the powershell package.
A hackish fix for this is to remove the dependency on libicu in the deb:
dpkg-deb --extract powershell-lts_7.4.2-1.deb_amd64.deb powershell-lts_7.4.2-1.deb_amd64
dpkg-deb --control powershell-lts_7.4.2-1.deb_amd64.deb powershell-lts_7.4.2-1.deb_amd64/DEBIAN
vim powershell-lts_7.4.2-1.deb_amd64/DEBIAN/control
# remove icu*
dpkg -b powershell-lts_7.4.2-1.deb_amd64/ powershell-lts_7.4.2-1.deb_amd64-fixed.deb
# install
sudo dpkg --install powershell-lts_7.4.2-1.deb_amd64-fixed.deb
# exits clean:
sudo apt-get -f install
Hope this helps @briped and anyone facing this issue.
cloud-init installs using apt failing as well, this code works on 22.04:
cloud_config_modules:
- apt_configure
- package_update_upgrade_install
apt:
sources:
powershell:
source: 'deb https://packages.microsoft.com/ubuntu/24.04/prod $RELEASE main'
key: |
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.7 (GNU/Linux)
mQENBFYxWIwBCADAKoZhZlJxGNGWzqV+1OG1xiQeoowKhssGAKvd+buXCGISZJwT
LXZqIcIiLP7pqdcZWtE9bSc7yBY2MalDp9Liu0KekywQ6VVX1T72NPf5Ev6x6DLV
7aVWsCzUAF+eb7DC9fPuFLEdxmOEYoPjzrQ7cCnSV4JQxAqhU4T6OjbvRazGl3ag
OeizPXmRljMtUUttHQZnRhtlzkmwIrUivbfFPD+fEoHJ1+uIdfOzZX8/oKHKLe2j
H632kvsNzJFlROVvGLYAk2WRcLu+RjjggixhwiB+Mu/A8Tf4V6b+YppS44q8EvVr
M+QvY7LNSOffSO6Slsy9oisGTdfE39nC7pVRABEBAAG0N01pY3Jvc29mdCAoUmVs
ZWFzZSBzaWduaW5nKSA8Z3Bnc2VjdXJpdHlAbWljcm9zb2Z0LmNvbT6JATUEEwEC
AB8FAlYxWIwCGwMGCwkIBwMCBBUCCAMDFgIBAh4BAheAAAoJEOs+lK2+EinPGpsH
/32vKy29Hg51H9dfFJMx0/a/F+5vKeCeVqimvyTM04C+XENNuSbYZ3eRPHGHFLqe
MNGxsfb7C7ZxEeW7J/vSzRgHxm7ZvESisUYRFq2sgkJ+HFERNrqfci45bdhmrUsy
7SWw9ybxdFOkuQoyKD3tBmiGfONQMlBaOMWdAsic965rvJsd5zYaZZFI1UwTkFXV
KJt3bp3Ngn1vEYXwijGTa+FXz6GLHueJwF0I7ug34DgUkAFvAs8Hacr2DRYxL5RJ
XdNgj4Jd2/g6T9InmWT0hASljur+dJnzNiNCkbn9KbX7J/qK1IbR8y560yRmFsU+
NdCFTW7wY0Fb1fWJ+/KTsC4=
=J6gs
-----END PGP PUBLIC KEY BLOCK-----
filename: microsoft-prod.list
package_update: true
packages:
- powershell
package_upgrade: true
package_reboot_if_required: true
sudo apt install powershell
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
powershell : Depends: libicu72 but it is not installable or
libicu71 but it is not installable or
libicu70 but it is not installable or
libicu69 but it is not installable or
libicu68 but it is not installable or
libicu67 but it is not installable or
libicu66 but it is not installable or
libicu65 but it is not installable or
libicu63 but it is not installable or
libicu60 but it is not installable or
libicu57 but it is not installable or
libicu55 but it is not installable or
libicu52 but it is not installable
E: Unable to correct problems, you have held broken packages.
Temp fix is to run this first (thx @dixonwille):
tmpDir=$(mktemp -d)
curl -sSL 'https://launchpad.net/ubuntu/+archive/primary/+files/libicu72_72.1-3ubuntu3_amd64.deb' -o "$tmpDir/libicu72_72.1-3ubuntu3_amd64.deb"
dpkg -i "$tmpDir"/libicu72_72.1-3ubuntu3_amd64.deb
Hi, For those who look for a simple workaround install powershell via snap. This solution was not mentioned in the post or I missed it and for me this was the cleanest and easiest way according to my basic use of powershell.
Hi, For those who look for a simple workaround install powershell via snap. This solution was not mentioned in the post or I missed it and for me this was the cleanest and easiest way according to my basic use of powershell.
I don't remember exactly what is was, but I think in the snap version I had an issue with invoke-webrequest or loading certs. That's way I switched to the "normal" version
Given APT is the official package manager for Canonical Ubuntu, I am hoping we can get a fix here that enables APT.
What is the blocking task here? Is it just libicu?
Without a roadmap, this is starting to make me question whether I can trust Microsoft to support the Ubuntu platform natively for PowerShell and it's starting to affect my choice of PowerShell for projects that need to run on said platform.
Hey folks! This is top of priority list as we complete some pipeline work for our distro's. This work is currently targeted for release at the end of August. The distro roadmap is a GitHub project board located here: https://github.com/orgs/PowerShell/projects/23/views/1
Don't get me wrong, I really appreciate the work you do. But having to wait 4 full months for something that people might consider an essential, if they're really using it. That does sound like a too long waiting time, especially if the reason is something minor like in this case. And it's not, that the release of Ubuntu 24.04 came too sudden to anticipate and that testing wasn't possible. :(
Oh wow, I share @RouL 's feelings. I am a fan of Powershell and became a fan of Ubuntu because of Powershell. I don't want to rant either, but waiting another good one and a half months until it's eventually released at the end of August to be able to install Powershell through APT is throwing off my plans.
For what it's worth, I wish the Powershell guys at Microsoft good luck for finalizing the work for the Ubuntu 24.04 release (fingers crossed).
You can use snap:
snap install powershell --classic
Works well on my Ubuntu 24.04 LTS
Snaps unfortunately come with their own set of problems. Not a problem when you use FireFox or something as a snap, but things like powershell? No thank you. Last thing we tried as a snap in the company was ruby. After several hours of frustration, trying to install the gems we did need, we gave up and since then snaps are "banned" from all our company servers.
@theJasonHelmick how likely do you see this work being completed by the end of August? We're approaching the end of month in a good week and there's still 10 tasks pending. No one is currently assigned to this issue..
I'd also like to understand whether this delay is normal for Powershell support of new Ubuntu LTS releases, so I can plan out migrations better in the future.
Unfortunately, snap is not an option for me anymore, at least not as long as canonical keeps pushing stuff onto my system through snap without my consent. I'm not enough of a Linux expert to go fiddling with broken packages, dependencies and what not.
Hi @lutopastialis -- Thank you for the question. We have been targeting the end of August, however may slip to the beginning of September. This is not the normal cadence for any release including Ubuntu. We have been focused on needed improvements to our release pipelines. As we finish that work, new releases will continue on our normal cadence. As the new images are released, I will be notifying in these issues and closing them. Hopefully this will occur in the next few weeks.
Thank you @theJasonHelmick for providing transparency. I understand as I know how important streamlined pipelines are. I'm looking forward to enjoying the new image releases 👍
Hi there !
Any update on this issue ? As it's still open, I guess we can't install powershell on Ubuntu 24.04 ?
@candoumbe It's still not supported, not even after 24.04.1 was released and people starting upgrading en masse to noble. It's frankly ridiculous.
BTW, you can check for yourself easily without attempting to install it -- access https://packages.microsoft.com/ubuntu/24.04/prod/pool/main/p/ and check whether there's a powershell subdirectory there. As long as there isn't, it wasn't released yet.
By the way, poor man's workaround:
- Download the
mantic(!!) build of theicuruntime from https://packages.ubuntu.com/mantic/libicu72 -- in other words, https://packages.ubuntu.com/mantic/amd64/libicu72/download and fetchlibicu72_72.1-3ubuntu3_amd64.debfrom any of the mirrors. - Download the desired
jammy(!!) build ofpowershellfrom https://packages.microsoft.com/ubuntu/22.04/prod/pool/main/p/powershell/ -- for example,powershell_7.4.5-1.deb_amd64.deb - Install the packages:
sudo apt install /full/path/to/the/downloaded/libicu72_72.1-3ubuntu3_amd64.deband thensudo apt install /full/path/to/the/downloaded/powershell_7.4.5-1.deb_amd64.deb. Note that you must use the full, absolute path to the downloaded debs, this type of local installation requires that since otherwise apt will try to use a sandboxed user which won't have access to the files. We're usingaptinstead ofdpkg -ito ensure any other dependencies get resolved and fetched.
After this issue is solved and it's properly released for noble, don't forget to later uninstall both powershell and libicu72 and reinstall powershell properly from the noble repository.
@mihailim , I think you have the best workaround, but I also have minor suggestions for improvements, especially if we want to automate the installation, for example if we are building a Docker image:
- Take
libicu70fromjammyinstead oflibicu72frommantic, becausejammyis LTS and supported, whereasmanticis not supported anymore and may soon disappear from most mirrors. - Use
./instead of the full path in yourapt installcommand.
Here are the concrete commands:
wget https://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu70_70.1-2_amd64.deb
wget https://packages.microsoft.com/ubuntu/22.04/prod/pool/main/p/powershell/powershell_7.4.5-1.deb_amd64.deb
sudo apt install ./libicu70_70.1-2_amd64.deb ./powershell_7.4.5-1.deb_amd64.deb
@alexeikh Ah, you are right! For some reason I assumed that it would need ICU 72, but it declares a dep on libicu72 | libicu71 | libicu70 | libicu69 | libicu68 | libicu67 | libicu66 | libicu65 | libicu63 | libicu60 | libicu57 | libicu55 | libicu52 so any of those may fulfil it. Thank you!
Not sure about using relative paths for the apt install, though -- it may work, but YMMV depending on your environment. On interactive installs, apt's usage of the _apt sandbox UID can preclude anything but the full absolute path from working. If it works, awesome; otherwise, it'll complain about not finding the .deb file even though it's there, and retrying with the full path will probably succeed.
@theJasonHelmick any updates?
My organisation gave up at this moment. We'll continue onwards without PWSH. The release process seems to be not reliable enough when it comes to new Ubuntu LTS Releases. We didn't expect this to happen week 1, but 1 month seems to be a reasonable timeframe. It's now nearly 5 months.
You can install the powershell dotnet tool. I'm a dotnet dev so I already had dotnet on my machine.
...I can't find any words...
How come we have to "hope" for this apparently trivial task to be completed anytime soon? If this were a one man spare time project I would fully understand. But according to Wikipedia there are 228k people working at Microsoft and there doesn't seem to have been any progress on this since my last inqury a month ago.
So, what's the deal here? Anything??
Hello, It's quite an issue. Ubuntu 24.04/Noble is going to be the default container for years to come. Net8.0 / pwsh 7.4 is the LTS also for years to come. Both should be working together as standard pieces of infrastructure.
-- Edited pwsh 4.5 -> pwsh 7.4 (typo on my side)
Hello, It's quite an issue. Ubuntu 24.04/Noble is going to be the default container for years to come. Net8.0 / pwsh 4.5 is the LTS also for years to come. Both should be working together as standard pieces of infrastructure.
Don't get me wrong, but I think most people would've been happy if we would've at least got any pwsh 7.x Version at this point. And there is no excuse for this taking 5+ months. I mean wait one more month and a quarter of the time till the next Ubuntu LTS release has already passed.
Hello, It's quite an issue. Ubuntu 24.04/Noble is going to be the default container for years to come. Net8.0 / pwsh 4.5 is the LTS also for years to come. Both should be working together as standard pieces of infrastructure.
Don't get me wrong, but I think most people would've been happy if we would've at least got any pwsh 7.x Version at this point. And there is no excuse for this taking 5+ months. I mean wait one more month and a quarter of the time till the next Ubuntu LTS release has already passed.
Hello, I fully agree, but personally I only want 7.4. 7.2 is almost EOL (November 8, 2024 is in less than 2 months) and everything else is past EOL. 7.5 won't be an LTS. See : Powershell End Of Life My understanding is that everyone in the industry is making an effort for LTS product to work with other LTS products.
The crazy parts for me is that the dotnet sdk 8.0 on noble has already pwsh
❯ docker run -it mcr.microsoft.com/dotnet/sdk:8.0-noble-amd64 pwsh
PowerShell 7.4.5
PS />
So 99% of the work is done