PowerShell / PowerShell-Snap

MIT License
29 stars 15 forks source link

Interpreter not being set for the powershell package #65

Closed TravisEz13 closed 4 years ago

TravisEz13 commented 4 years ago

repro

install either of these:

snap refresh powershell --channel=edge/FixRelease
snap refresh powershell --channel=lts/edge/FixRelease

then run

powershell

Actual results

Failed to load ���, error: /snap/core18/current/lib/x86_64-linux-gnu/librt.so.1: undefined symbol: __clock_nanosleep, version GLIBC_PRIVATE
Failed to bind to CoreCLR at '/snap/powershell/119/opt/powershell/'
Failed to create CoreCLR, HRESULT: 0x80008088

Investigation

snap didn't patch the interpreter

patchelf --print-interpreter /snap/powershell/119/opt/powershell/pwsh

should be

/snap/core18/current/lib64/ld-linux-x86-64.so.2

but is

/lib64/ld-linux-x86-64.so.2
TravisEz13 commented 4 years ago

this is a new issue to reduce confusion from #60

cc @sergiusens @cjp256 Can you have a look?

unitysipu commented 4 years ago

is there a temporary workaround until there's a fix?

TravisEz13 commented 4 years ago

@unitysipu The only workaround we know is to use the powershell-preview package. Canonical and .NET are discussing this offline.

TravisEz13 commented 4 years ago

Canonical notified me that the fix for this issue is available in the edge channel of snapcraft.

TravisEz13 commented 4 years ago

Instructions to test the fix

What has already been tested

If you haven't installed the powershell snap

sudo snap install powershell --classic --channel=edge/useedge

If you have installed the powershell snap

sudo snap refresh powershell --channel=edge/useedge
superbonaci commented 4 years ago

Installing powershell on ubuntu 20.04:

sudo snap install powershell --classic
powershell 7.0.0 from Microsoft PowerShell✓ installed
pwsh
Failed to load ���, error: /snap/powershell/104/opt/powershell/../../lib/x86_64-linux-gnu/librt.so.1: undefined symbol: __clock_nanosleep, version GLIBC_PRIVATE
Failed to bind to CoreCLR at '/snap/powershell/104/opt/powershell/'
Failed to create CoreCLR, HRESULT: 0x80008088
TravisEz13 commented 4 years ago

@superbonaci you did not use the work around. This is the same error as the issue. Just upvote the issue if you are having the EXACT same problem.

TravisEz13 commented 4 years ago

The fix from canoncial was release in the 7.0.1 snap yesterday.