-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
dotnet: command not found Mac OS X 10.11.4, dotnet-osx-x64.1.0.0-rc2-3002702.pkg #6119
Comments
same problem with u, still do not how to fix it. |
If you created symlinks manually, they may point to a different directory. execute |
Also note that there is another zsh related issue thread: #5193 |
I just open a new terminal, it works. It's the first time to install. If I use existing terminal before the installer, it seems the path is not effect, so cannot find command 'dotnet'. |
@wenjiangtao The quick fix is to just run @dasMulli I haven't made any symlinks to the dotnet binary before, and there was nothing referencing it in Also, in reference to that issue, I think the more sensible option would be to just create a symlink in @flyingsky I'm not sure if the installer actually added a symlink to |
What would help, guys, was if any of you would post your |
Or, at least post how is your path in said files configured. This seems to be the common thread/culprit for this problem. |
I ran into the same issue. I'm using oh-my-zsh. Here's the relevant portion of my ~/.zshrc:
Manually creating the symlink to /usr/local/bin/ fixed it for me. Thanks! |
@pofallon one question: how did you install |
Good question -- I don't remember :) Most of that predated my switch to zsh (I haven't been using zsh very long). |
Same process on a different Mac -- same results, and same fix worked. Also using oh-my-zsh. Here's the relevant PATH info:
I had to manually fix the |
@pofallon aha, good. :) Good in the sense that then I know what the problem is. So it seems that the main culprit here is the way installer for oh-my-zsh works. It creates a The only way to solve this, apart from filing a bug on /cc @brthor @piotrpMSFT |
This change removes adding the path through /etc/paths.d and goes to adding a symlink to /usr/bin. The reason is that there is a lot of users who are running into problems with zsh and oh-my-zsh has a bug in the installer where they generate a .zshrc file with an exploded $PATH at the time of install. This overrides the dynamic path that is created with path_helper. Fixes #3063, #2988, #1567
@blackdwarf Good catch! I also found a similar offending line in my export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin" At this point, it's been so long since I set up zsh on my machine that I honestly can't remember what's responsible for that line in there, but oh-my-zsh is definitely a likely culprit. To resolve the issue on my end, I've changed the export to this: export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:$PATH" Which then allows me to do this: shawn ~ which dotnet
/usr/local/share/dotnet/dotnet Cheers! |
After some thinking about this, I think that this is really a problem of various different shell installers. We will have documentation to essentially have a workaround to add the symbolic link manually. |
I had the same problem and found that closing my terminal sessions and reopening a new terminal fixed this issue as @flyingsky stated. |
Add updated information to the known issues document about the oh-my-zsh problem and how to solve it. skip ci please Fixes #3063, #1567
Add updated information to the known issues document about the oh-my-zsh problem and how to solve it. skip ci please Fixes #3063, #1567
Adding # Add .NET to $PATH
export PATH="/usr/local/share/dotnet:$PATH" |
Steps to reproduce
pkg
installer:dotnet-osx-x64.1.0.0-rc2-3002702.pkg
.dotnet
Expected behavior
dotnet
executes and probably prints usage information because no specific command was passed.Actual behavior
I'm given this output:
zsh: command not found: dotnet
Environment data
dotnet --info
output:shawn ~ dotnet --info zsh: command not found: dotnet
¯_(ツ)_/¯
normandy:~ shawn$ /usr/local/share/dotnet/dotnet --info .NET Command Line Tools (1.0.0-preview1-002702) Product Information: Version: 1.0.0-preview1-002702 Commit Sha: 6cde21225e Runtime Environment: OS Name: Mac OS X OS Version: 10.11 OS Platform: Darwin RID: osx.10.11-x64
This package was found at
https://go.microsoft.com/fwlink/?LinkID=798388
, and was not the link specified at the actual instruction guide athttps://www.microsoft.com/net/core#macosx
.Verifying the hash:
It's also worth mentioning that
dotnet
does, in fact, exist at/usr/local/share/dotnet/dotnet
,but there's definitely no symlink inWhile there's definitely no symlink, the more I read about this issue, the more it seems like that's intentional. This is most likely actually a duplicate of #5193 and highlights the insufficiency of using/usr/local/bin/
.path_helper
for zsh users.The text was updated successfully, but these errors were encountered: