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

dnu restore broken #687

Closed
richlander opened this Issue Jun 21, 2015 · 31 comments

Comments

Projects
None yet
@richlander
Copy link
Member

richlander commented Jun 21, 2015

I see this with dnu restore with the latest version. 1.0.0-beta6-12032 does the right thing on the same project.

dotnet-mbp:dnulist richlander$ dnu restore
-bash: /Users/richlander/.dnx/runtimes/dnx-mono.1.0.0-beta6-12100/bin/dnu: Permission denied

@davidfowl

@davidfowl

This comment has been minimized.

Copy link
Member

davidfowl commented Jun 21, 2015

Update dnvm, this was already fixed aspnet/dnx#2081.

@davidfowl davidfowl closed this Jun 21, 2015

@richlander

This comment has been minimized.

Copy link
Member Author

richlander commented Jun 22, 2015

Works. Thanks.

@VegaFromLyra

This comment has been minimized.

Copy link

VegaFromLyra commented Jun 24, 2015

I see the same error with what seems like a later version of dnvm,
-bash: /Users/ashab/.dnx/runtimes/dnx-mono.1.0.0-beta6-12120/bin/dnu: Permission denied

I updated dnvm following this post: http://stackoverflow.com/questions/29952630/how-to-get-the-dnu-command-working-on-os-x aka

source dnvm.sh
dnvm upgrade -u

But still see the error above, anything I missed?

@VegaFromLyra

This comment has been minimized.

Copy link

VegaFromLyra commented Jun 28, 2015

Running dnvm upgrade fixed it for me

@FinVamp1

This comment has been minimized.

Copy link

FinVamp1 commented Jul 2, 2015

Dnvm upgrade doesn't fix it for me. Not sure if I should run Brew install again?

Finbars-MacBook-Pro:BattlestarSho finbar_ryan$ dnvm upgrade -u -f
Determining latest version
Latest version is 1.0.0-beta6-12162
Forcing download by deleting /Users/finbar_ryan/.dnx/runtimes/dnx-mono.1.0.0-beta6-12162 directory
Downloading dnx-mono.1.0.0-beta6-12162 from https://www.myget.org/F/aspnetvnext/api/v2
Download: https://www.myget.org/F/aspnetvnext/api/v2/package/dnx-mono/1.0.0-beta6-12162
######################################################################## 100.0%
Installing to /Users/finbar_ryan/.dnx/runtimes/dnx-mono.1.0.0-beta6-12162
Adding /Users/finbar_ryan/.dnx/runtimes/dnx-mono.1.0.0-beta6-12162/bin to process PATH
Updating alias 'default' to 'dnx-mono.1.0.0-beta6-12162'
Finbars-MacBook-Pro:BattlestarSho finbar_ryan$ dnu restore
-bash: /Users/finbar_ryan/.dnx/runtimes/dnx-mono.1.0.0-beta6-12162/bin/dnu: Permission denied
Finbars-MacBook-Pro:BattlestarSho finbar_ryan$

@FinVamp1

This comment has been minimized.

Copy link

FinVamp1 commented Jul 3, 2015

Just to share that I resolved this.
The dnu executable was missing Execute Permissions so I copied the permissions from dnx.
]-rwxr-xr-x 1 finbar_ryan staff 539 2 Jul 18:23 dnu

This all works great now.

@javi830810

This comment has been minimized.

Copy link

javi830810 commented Jul 28, 2015

Koodos to FinVamp

chmod 777 /Users/<>/.dnx/runtimes/dnx-mono.1.0.0-beta6/bin/dnu

@FinVamp1

This comment has been minimized.

Copy link

FinVamp1 commented Jul 28, 2015

As indicated earlier in the thread this was resolved in this issue and the recommendation is to "run dnvm update-self, then run dnvm upgrade after".

@lclghst

This comment has been minimized.

Copy link

lclghst commented Jul 28, 2015

I just set the execute permissions as per @FinVamp1 @javi830810

@spboyer

This comment has been minimized.

Copy link

spboyer commented Jul 29, 2015

no fixed, dnvm upgrade does not fix. Fresh update today to beta6. dnvm upgrade -u doesn't fix either.
@coolcsh @glennc

@davidfowl

This comment has been minimized.

Copy link
Member

davidfowl commented Jul 29, 2015

Confirmed. This is still broken

@lukemurray

This comment has been minimized.

Copy link

lukemurray commented Aug 6, 2015

I have this issue with dnx-mono.1.0.0-beta6 or dnx-mono.1.0.0-beta6 or beta7. I'm running OSX 10.11 public beta 3. Anyone have this working?

@JeremyCade

This comment has been minimized.

Copy link

JeremyCade commented Aug 6, 2015

For those of you who are seeing this issue on OS X, with DNX installed via Homebrew:

screen shot 2015-08-07 at 12 18 41 am
Figure: Permission is denied.

The fix is rather simple: grant execution permissions to the dnu command.

Steps to fix:

  1. Open Terminal ⌘+space Terminal
  2. Execute the following:
    cd ~/.dnx/runtimes/dnx-mono.1.0.0-beta6/bin/
    chmod +x dnu
  1. No more issues.

screen shot 2015-08-07 at 12 24 41 am
Figure: Executeable dnu

@BrennanConroy

This comment has been minimized.

Copy link
Member

BrennanConroy commented Aug 6, 2015

What version of dnvm are you using? The latest should no longer have this issue.

@lukemurray

This comment has been minimized.

Copy link

lukemurray commented Aug 6, 2015

I am using the version install by homebrew. I'll try the trick above when I'm back to my laptop. 

Thanks

@lukemurray

This comment has been minimized.

Copy link

lukemurray commented Aug 6, 2015

Yes making it executable worked. Thanks.

@martinalderson

This comment has been minimized.

Copy link

martinalderson commented Aug 15, 2015

This is still broken, I had to manually add the executable flag.

@BrennanConroy

This comment has been minimized.

Copy link
Member

BrennanConroy commented Aug 15, 2015

What version of dnvm did you install the dnx with?

@martinalderson

This comment has been minimized.

Copy link

martinalderson commented Aug 16, 2015

.NET Version Manager - Version 1.0.0-beta5-10375 I think (from running dnvm)

@BrennanConroy

This comment has been minimized.

Copy link
Member

BrennanConroy commented Aug 16, 2015

Could you update your dnvm, thats a pretty old build

@martinalderson

This comment has been minimized.

Copy link

martinalderson commented Aug 16, 2015

How do I do that? I've done dnvm upgrade and it is the latest version?

@BrennanConroy

This comment has been minimized.

Copy link
Member

BrennanConroy commented Aug 16, 2015

dnvm update-self

@JeremyCade

This comment has been minimized.

Copy link

JeremyCade commented Aug 16, 2015

@BrennanConroy dnvm update-self doesn't work with the OS X Homebrew install.

screen shot 2015-08-16 at 11 56 00 am
Figure: dnvm update expects dnvm directory in .dnx folder

As you can see from the following tree .dnx output, the dnvm directory is not present.

.dnx/
├── alias
│   └── default.alias
└── runtimes
    ├── dnx-mono.1.0.0-beta4
    │   ├── bin
    │   │   ├── Microsoft.CodeAnalysis.CSharp.Desktop.dll
    │   │   ├── Microsoft.CodeAnalysis.CSharp.dll
    │   │   ├── Microsoft.CodeAnalysis.Desktop.dll
    │   │   ├── Microsoft.CodeAnalysis.dll
    │   │   ├── Microsoft.Framework.ApplicationHost.dll
    │   │   ├── Microsoft.Framework.DesignTimeHost.Interfaces.dll
    │   │   ├── Microsoft.Framework.Runtime.Interfaces.dll
    │   │   ├── Microsoft.Framework.Runtime.Loader.dll
    │   │   ├── Microsoft.Framework.Runtime.Roslyn.Common.dll
    │   │   ├── Microsoft.Framework.Runtime.Roslyn.Interfaces.dll
    │   │   ├── Microsoft.Framework.Runtime.Roslyn.dll
    │   │   ├── Microsoft.Framework.Runtime.dll
    │   │   ├── Newtonsoft.Json.dll
    │   │   ├── System.Collections.Immutable.dll
    │   │   ├── System.Reflection.Metadata.dll
    │   │   ├── dnu
    │   │   ├── dnx
    │   │   ├── dnx.host.dll
    │   │   ├── dnx.mono.managed.dll
    │   │   └── lib
    │   │       ├── Microsoft.Framework.DesignTimeHost
    │   │       │   ├── Microsoft.Framework.DesignTimeHost.dll
    │   │       │   └── Microsoft.Framework.NotNullAttribute.Internal.dll
    │   │       ├── Microsoft.Framework.PackageManager
    │   │       │   └── Microsoft.Framework.PackageManager.dll
    │   │       └── Microsoft.Framework.Project
    │   │           └── Microsoft.Framework.Project.dll
    │   ├── dnx-mono.nuspec
    │   └── package
    │       └── services
    │           └── metadata
    │               └── core-properties
    │                   └── ddd70229659a44fe8e4fbc08b9d84d87.psmdcp
    └── dnx-mono.1.0.0-beta6
        ├── bin
        │   ├── Microsoft.CodeAnalysis.CSharp.dll
        │   ├── Microsoft.CodeAnalysis.dll
        │   ├── Microsoft.Framework.ApplicationHost.dll
        │   ├── Microsoft.Framework.DesignTimeHost.Abstractions.dll
        │   ├── Microsoft.Framework.Runtime.Abstractions.dll
        │   ├── Microsoft.Framework.Runtime.Caching.dll
        │   ├── Microsoft.Framework.Runtime.Compilation.DesignTime.dll
        │   ├── Microsoft.Framework.Runtime.Loader.dll
        │   ├── Microsoft.Framework.Runtime.Roslyn.Abstractions.dll
        │   ├── Microsoft.Framework.Runtime.Roslyn.Common.dll
        │   ├── Microsoft.Framework.Runtime.Roslyn.dll
        │   ├── Microsoft.Framework.Runtime.dll
        │   ├── System.Collections.Immutable.dll
        │   ├── System.Reflection.Metadata.dll
        │   ├── dnu
        │   ├── dnx
        │   ├── dnx.host.dll
        │   ├── dnx.mono.managed.dll
        │   └── lib
        │       ├── Microsoft.Framework.DesignTimeHost
        │       │   ├── Microsoft.Framework.DesignTimeHost.dll
        │       │   ├── Microsoft.Framework.NotNullAttribute.Sources.dll
        │       │   └── Newtonsoft.Json.dll
        │       ├── Microsoft.Framework.PackageManager
        │       │   ├── Microsoft.Framework.NotNullAttribute.Sources.dll
        │       │   ├── Microsoft.Framework.PackageManager.dll
        │       │   └── Newtonsoft.Json.dll
        │       └── Microsoft.Framework.Project
        │           └── Microsoft.Framework.Project.dll
        ├── dnx-mono.nuspec
        └── package
            └── services
                └── metadata
                    └── core-properties
                        └── 6586fbcfbbe442c4a108a4b34abfbae8.psmdcp

22 directories, 53 files

This is due to Homebrew installing packages into /usr/local/Cellar/ and then symlinking to /usr/local/bin by default.

The advised method to update dnvm in this case would be to run: brew update; brew upgrade dnvm

@martinalderson

This comment has been minimized.

Copy link

martinalderson commented Aug 16, 2015

I'm using the latest from homebrew, it appears.

@BrennanConroy

This comment has been minimized.

Copy link
Member

BrennanConroy commented Aug 16, 2015

Unfortunately we don't support upgrade through homebrew. You need to brew remove dnvm brew install dnvm source dnvm.sh to upgrade it

@reznet

This comment has been minimized.

Copy link

reznet commented Aug 16, 2015

I also hit encountered the error Permission Denied when trying to run dnu restore, and am trying to fix it w/o having to fiddle with the dnu permissions. I also installed dnvm via homebew as per https://dotnet.readthedocs.org/en/latest/getting-started/installing-core-osx.html. (As an aside, what other way is there to install dnvm? that url certainly looks like official documentation even if it isn't).

I've tried removing and reinstalling dnvm via homebrew, but I still get the error. It appears the only fix is to manually change the executable bit on dnu or remove dnvm and mono from homebrew and install them via the instructions at http://docs.asp.net/en/latest/getting-started/installing-on-mac.html. Can you see from my terminal session below if there was a step I skipped? (other than manually changing the executable bit)

~/dotnet/first $ dnvm list

Active Version              Runtime Arch Location             Alias
------ -------              ------- ---- --------             -----
  *    1.0.0-beta7-12364    coreclr x64  ~/.dnx/runtimes      
       1.0.0-beta4          mono         ~/.dnx/runtimes      
       1.0.0-beta7-12364    mono         ~/.dnx/runtimes      default

~/dotnet/first $ dnvm use 1.0.0-beta7-12364 -r mono
Adding /Users/jeff/.dnx/runtimes/dnx-mono.1.0.0-beta7-12364/bin to process PATH
~/dotnet/first $ dnu restore
-bash: /Users/jeff/.dnx/runtimes/dnx-mono.1.0.0-beta7-12364/bin/dnu: Permission denied
~/dotnet/first $ dnvm upgrade
Determining latest version
Latest version is 1.0.0-beta6 
Downloading dnx-mono.1.0.0-beta6 from https://www.nuget.org/api/v2
Download: https://www.nuget.org/api/v2/package/dnx-mono/1.0.0-beta6
######################################################################## 100.0%
Installing to /Users/jeff/.dnx/runtimes/dnx-mono.1.0.0-beta6
Adding /Users/jeff/.dnx/runtimes/dnx-mono.1.0.0-beta6/bin to process PATH
Updating alias 'default' to 'dnx-mono.1.0.0-beta6'
~/dotnet/first $ dnvm list

Active Version              Runtime Arch Location             Alias
------ -------              ------- ---- --------             -----
       1.0.0-beta7-12364    coreclr x64  ~/.dnx/runtimes      
       1.0.0-beta4          mono         ~/.dnx/runtimes      
  *    1.0.0-beta6          mono         ~/.dnx/runtimes      default
       1.0.0-beta7-12364    mono         ~/.dnx/runtimes      

~/dotnet/first $ dnu restore
-bash: /Users/jeff/.dnx/runtimes/dnx-mono.1.0.0-beta6/bin/dnu: Permission denied
~/dotnet/first $ dnvm update-self
~/.dnx/dnvm/dnvm.sh doesn't exist. This command assumes you have installed dnvm in the usual location and are trying to update it. If you want to use update-self then dnvm.sh should be sourced from ~/.dnx/dnvm 
~/dotnet/first $ brew remove dnvm
Uninstalling /usr/local/Cellar/dnvm/1.0.0-dev... (4 files, 56K)
~/dotnet/first $ brew install dnvm
==> Installing dnvm from aspnet/homebrew-dnx
==> Cloning https://github.com/aspnet/Home.git
Updating /Library/Caches/Homebrew/dnvm--git
==> Checking out branch dev
==> bash -c 'source /usr/local/Cellar/dnvm/1.0.0-dev/libexec/dnvm.sh; dnvm upgra
==> Caveats
Add the following to the ~/.bash_profile, ~/.bashrc or ~/.zshrc file:

  source dnvm.sh

==> Summary
🍺  /usr/local/Cellar/dnvm/1.0.0-dev: 4 files, 56K, built in 5 seconds
~/dotnet/first $ source dnvm.sh
~/dotnet/first $ dnvm update-self
~/.dnx/dnvm/dnvm.sh doesn't exist. This command assumes you have installed dnvm in the usual location and are trying to update it. If you want to use update-self then dnvm.sh should be sourced from ~/.dnx/dnvm 
~/dotnet/first $ dnu restore
-bash: /Users/jeff/.dnx/runtimes/dnx-mono.1.0.0-beta6/bin/dnu: Permission denied
~/dotnet/first $ brew update
Updated Homebrew from 3cf099d4 to a3af9ee6.
==> New Formulae
[snip a bit list]
~/dotnet/first $ brew upgrade dnvm
Error: aspnet/dnx/dnvm 1.0.0-dev already installed
~/dotnet/first $ dnu restore
-bash: /Users/jeff/.dnx/runtimes/dnx-mono.1.0.0-beta6/bin/dnu: Permission denied
~/dotnet/first $ ls -l ~/.dnx/runtimes/dnx-mono.1.0.0-beta6/bin/dnu
-rw-r--r--  1 jeff  staff   539B Jul 20 14:15 /Users/jeff/.dnx/runtimes/dnx-mono.1.0.0-beta6/bin/dnu
~/dotnet/first $ ls -l ~/.dnx/runtimes/dnx-mono.1.0.0-beta7-12364/bin/dnu
-rw-r--r--  1 jeff  staff   513B Aug 14 12:19 /Users/jeff/.dnx/runtimes/dnx-mono.1.0.0-beta7-12364/bin/dnu
~/dotnet/first $ 


@BrennanConroy

This comment has been minimized.

Copy link
Member

BrennanConroy commented Aug 16, 2015

When you upgrade your dnvm to one that doesn't have the permission denied bug you need to reinstall the runtime so that it will set the executable flag correctly.

@reznet

This comment has been minimized.

Copy link

reznet commented Aug 16, 2015

Great! I can now execute dnu and I didn't have to set its executable bit manually. But in order to reinstall the runtime, I had to use the -f flag with dnvm install. I already had the latest runtime installed, and running the install command dnvm install latest did not reinstall the runtime. I also didn't see a dnvm uninstall command, so I'm not sure if uninstalling the runtime and then re-installing it is an option.

So for future reference, if you need to reinstall the runtime, use the -f flag.

~/dotnet/first $ dnvm install latest -f
@jbeckton

This comment has been minimized.

Copy link

jbeckton commented Apr 3, 2016

This is frustrating, just got the latest aspnet bits for Mac and still broken... For those of you that need to get work done Node.js and Typescript are very stable. Even the release candidate for .net core is jacked up. Building web apps on a Mac or Linux box should not be this messed up.

@MaximRouiller

This comment has been minimized.

Copy link

MaximRouiller commented Apr 5, 2016

@jbeckton Latest bits? As in RC2? They are still integrating those bits. You might have nightly build that one day will work and the other won't. They are merging concepts from DNX and dotnet-cli. Lots of work to be done and lots of workaround too.

RC1? Should be pretty stable and working.

@jbeckton

This comment has been minimized.

Copy link

jbeckton commented Apr 5, 2016

What ever the latest release that is available via the package manager
without specifying a version is what I installed.
On Apr 5, 2016 6:57 AM, "Maxime Rouiller" notifications@github.com wrote:

@jbeckton https://github.com/jbeckton Latest bits? As in RC2? They are
still integrating those bits. You might have nightly build that one day
will work and the other won't. They are merging concepts from DNX and
dotnet-cli. Lots of work to be done and lots of workaround too.

RC1? Should be pretty stable and working.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#687 (comment)

ryanbrandenburg pushed a commit that referenced this issue Nov 22, 2018

Add docs - EndpointFeature and related types (#687)
* Add docs - EndpointFeature and related types

* Add docs for route patterns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.