Octo command error on CentOS-7 with donet-3.1

Hi, I’m trying to run the octo command on my CentOS7 machine with donet-3.1 installed but I’m getting an error:

Failed to load x, error: /var/tmp/.net/octo/1fd2ljjz.loc/libhostfxr.so: failed to map 
segment from shared object: Operation not permitted
The library libhostfxr.so was found, but loading it from /var/tmp/.net/octo/1fd2ljjz.l
oc/libhostfxr.so failed
  - Installing .NET Core prerequisites might help resolve this problem.
     https://go.microsoft.com/fwlink/?linkid=2063370

Please find below my dotnet --info output:

.NET Core SDK (reflecting any global.json):
 Version:   3.1.201
 Commit:    b1768b4ae7

Runtime Environment:
 OS Name:     centos
 OS Version:  7
 OS Platform: Linux
 RID:         centos.7-x64
 Base Path:   /usr/share/dotnet/sdk/3.1.201/

Host (useful for support):
  Version: 3.1.3
  Commit:  4a9f85e9f8

.NET Core SDKs installed:
  3.1.201 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Any ideas of why the command is giving me the weird error?

Hi Francisco,

That definitely is an unusual error. Thank you for all of the information. I have to follow the suggestions offered up in the error message that you’ve pasted.

In order to help you out, I’ve built up an environment similar to yours, so I can test the setup and so that we can compare configuration. The octo command line is working well for me, but I will admit that this is a completely fresh installation.

In order to get to the bottom of this issue, we should consider the dependencies required for the octo command (and dotnet core 3.1) to work. Can you please confirm that you have the following dependencies installed. To do this, please run the following command against the list of packages below and please let me know the “Currently installed version for each”. I’ve included the results for my test environment below.

dnf info <Package>

Packages to Check
lttng-ust
libcurl
libicu
libgdiplus
zlib
openssl-libs
krb5-libs
octopuscli

Gathered from this website: Centos Fedora dotnet dependencies

Finally, if you could please also run the following command and post the output:

whereis dotnet

My Environment
Here is the currently installed version of those packages on my test-environment.
lttng-ust 2.10.4
libcurl 7.66.0
libicu 63.2
libgdiplus 5.6
zlib 1.2.11
openssl-libs 1.1.1d
krb5-libs 1.17
octopuscli 7.3.2

Here is the result of dotnet --info

.NET Core SDK (reflecting any global.json):
Version: 3.1.201
Commit: b1768b4ae7

Runtime Environment:
OS Name: fedora
OS Version: 31
OS Platform: Linux
RID: fedora.31-x64
Base Path: /usr/share/dotnet/sdk/3.1.201/

Host (useful for support):
Version: 3.1.3
Commit: 4a9f85e9f8

.NET Core SDKs installed:
3.1.201 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

If you can get back to me with those details, we can start interrogating further.

Thank you!

Hello, please find the output below:

dnf info lttng-ust:
Last metadata expiration check: 0:11:36 ago on Thu 16 Apr 2020 08:05:12 AM CAT.
Error: No matching Packages to list

dnf info libcurl:
Last metadata expiration check: 0:12:08 ago on Thu 16 Apr 2020 08:05:12 AM CAT.
Installed Packages
Name : libcurl
Version : 7.29.0
Release : 54.el7_7.2
Arch : x86_64
Size : 429 k
Source : curl-7.29.0-54.el7_7.2.src.rpm
Repo : @System
Summary : A library for getting files from web servers
URL : http://curl.haxx.se/
License : MIT

dnf info libicu:
Last metadata expiration check: 0:12:58 ago on Thu 16 Apr 2020 08:05:12 AM CAT.
Installed Packages
Name : libicu
Version : 50.2
Release : 4.el7_7
Arch : x86_64
Size : 24 M
Source : icu-50.2-4.el7_7.src.rpm
Repo : @System
Summary : International Components for Unicode - libraries
URL : http://www.icu-project.org/
License : MIT and UCD and Public Domain

dnf info libgdiplus:
Last metadata expiration check: 0:13:58 ago on Thu 16 Apr 2020 08:05:12 AM CAT.
Error: No matching Packages to list

dnf info zlib:
Last metadata expiration check: 0:14:19 ago on Thu 16 Apr 2020 08:05:12 AM CAT.
Installed Packages
Name : zlib
Version : 1.2.7
Release : 18.el7
Arch : x86_64
Size : 181 k
Source : zlib-1.2.7-18.el7.src.rpm
Repo : @System
Summary : The compression and decompression library
URL : http://www.zlib.net/
License : zlib and Boost

dnf info openssl-libs:
Last metadata expiration check: 0:15:01 ago on Thu 16 Apr 2020 08:05:12 AM CAT.
Installed Packages
Name : openssl-libs
Epoch : 1
Version : 1.0.2k
Release : 19.el7
Arch : x86_64
Size : 3.1 M
Source : openssl-1.0.2k-19.el7.src.rpm
Repo : @System
Summary : A general purpose cryptography library with TLS implementation
URL : http://www.openssl.org/
License : OpenSSL

dnf info krb5-libs:
Last metadata expiration check: 0:15:39 ago on Thu 16 Apr 2020 08:05:12 AM CAT.
Installed Packages
Name : krb5-libs
Version : 1.15.1
Release : 37.el7_7.2
Arch : x86_64
Size : 2.1 M
Source : krb5-1.15.1-37.el7_7.2.src.rpm
Repo : @System
Summary : The non-admin shared libraries used by Kerberos 5
URL : http://web.mit.edu/kerberos/www/
License : MIT

dnf info octopuscli:
Last metadata expiration check: 0:16:13 ago on Thu 16 Apr 2020 08:05:12 AM CAT.
Installed Packages
Name : octopuscli
Version : 7.3.2
Release : 1
Arch : x86_64
Size : 78 M
Source : octopuscli-7.3.2-1.src.rpm
Repo : @System
Summary : Command line tool for Octopus Deploy
URL : https://octopus.com/
License : unknown

whereis dotnet:
dotnet: /usr/bin/dotnet /usr/share/dotnet /usr/share/man/man1/dotnet.1

Apparently I have two dependencies missing:

  • lttng-ust
  • libgdiplus

But when I try to install lttng-ust, I get the following:
Package lttng-ust-2.4.1-4.el7.x86_64 already installed and latest version

Same happens when I try to install libgdiplus:
Package libgdiplus-2.10-10.el7.x86_64 already installed and latest version

Any ideas?

Hi Francisco,

Great News! I replicated your issue.

Failed to load X�9, error: /usr/share/dotnet/host/fxr/3.1.3/libhostfxr.so: cannot open shared object file: Permission denied
The library libhostfxr.so was found, but loading it from /usr/share/dotnet/host/fxr/3.1.3/libhostfxr.so failed

The problem and solution for me, in order to break the service “on command” was to change the libhostfxr.so file’s permissions. In particular removing the “Read-Only” permission from “Others Access”.

Can you please try the following command on your installation, in order to provide read access to the libhostfxr.so file.

sudo chmod o+r /var/tmp/.net/octo/1fd2ljjz.loc/libhostfxr.so

Hopefully this solves your issues. Please, let me know how you go.

Kind Regards,

Dane

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.