Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libhostfxr.dylib could not be found #2958

Closed
Petermarcu opened this issue Nov 9, 2017 · 6 comments
Closed

libhostfxr.dylib could not be found #2958

Petermarcu opened this issue Nov 9, 2017 · 6 comments

Comments

@Petermarcu
Copy link
Member

@Marksion08 commented on Thu Nov 09 2017

libhostfxr.dylib could not be found

$ hello> dotnet new

A fatal error occurred, the required library libhostfxr.dylib could not be found at /usr/local/bin/

Info

So happy to heart that .netcore support macOS sierra, but while I have tried that's still a big disappointment!


@Petermarcu commented on Thu Nov 09 2017

Can you describe how you installed .NET Core?

@Marksion08
Copy link

More Installation details:

Follow as Official site: macOS install guide

Step1:

brew update
brew install openssl
mkdir -p /usr/local/lib
ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/

brew link --force openssl

Step2:

Download .NET Core 2.x and Setup.

Step3:

$ mkdir hello
$ cd hello
$ dotnet new
 A fatal error occurred, the required library libhostfxr.dylib could not be found at /usr/local/bin/

````




@Marksion08
Copy link

Marksion08 commented Nov 10, 2017 via email

@Petermarcu
Copy link
Member Author

@steveharter any ideas?

@steveharter
Copy link
Member

Some troubleshooting recommendations:
1) Verify the dotnet executable location - type which dotnet.

For you it appears that it is going to be /usr/local/bin/. However the default install location (and on my mac) is /usr/local/share/dotnet/

Do you happen to have an old install at /usr/local/bin/ that is in the path? Normally /usr/local/bin is going to be in the path before /usr/local/share/dotnet (verify via echo $PATH)

2) Fom the dotnet executable location there should be a subfolder called host/fxr/2.0.0 with the libhostfxr.dylib file

3) Try setting export COREHOST_TRACE=1 and then run dotnet new again to get any further diagnostics

@Marksion08
Copy link

Marksion08 commented Nov 13, 2017

@steveharter
Thank you very much your advises!

It seems to be the Permission problem at last after tried many times, it showed "Permission Denied".
But it worked fine once time if export the /usr/local/share/dotnet to $path and ln -s source correctly, close it and try again all was gone, which dotnet was none too.

Summary up, not permission enough to execute the application, although tried update right as 'sudo chown -R user_xxx /usr/local/share/dotnet' or 'sudo chmod -R 7xx /usr/local/bin/dotnet'.

Regards & Thanks!
MKH

@Petermarcu
Copy link
Member Author

Great! I'll go ahead and close this issue now.

@msftgits msftgits transferred this issue from dotnet/core-setup Jan 30, 2020
@dotnet dotnet locked as resolved and limited conversation to collaborators Dec 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants