Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save gildardoperez/f2f3652413ecbc8969b33667ccd11ade to your computer and use it in GitHub Desktop.

Select an option

Save gildardoperez/f2f3652413ecbc8969b33667ccd11ade to your computer and use it in GitHub Desktop.

Revisions

  1. @irazasyed irazasyed revised this gist Feb 2, 2016. 1 changed file with 11 additions and 12 deletions.
    23 changes: 11 additions & 12 deletions homebrew-permissions-issue.md
    Original file line number Diff line number Diff line change
    @@ -7,8 +7,8 @@ Homebrew Permissions Denied Issues Solution
    `brew install node`


    ```
    ~$ brew install node
    ``` bash
    $ brew install node
    ==> Downloading http://nodejs.org/dist/v0.10.4/node-v0.10.4.tar.gz
    Already downloaded: /Library/Caches/Homebrew/node-0.10.4.tar.gz
    ==> ./configure --prefix=/usr/local/Cellar/node/0.10.4
    @@ -23,8 +23,8 @@ You can try again using `brew link node'
    ### `brew link node`
    ```
    ~$ brew link node
    ``` bash
    $ brew link node
    Linking /usr/local/Cellar/node/0.10.4... Warning: Could not link node. Unlinking...
    Error: Could not symlink file: /usr/local/Cellar/node/0.10.4/lib/dtrace/node.d
    @@ -38,25 +38,24 @@ To list all files that would be deleted:
    ### `brew link --overwrite node`
    ```
    ``` bash
    Linking /usr/local/Cellar/node/0.10.4... Warning: Could not link node. Unlinking...
    Error: Permission denied - /usr/local/lib/dtrace/node.d
    ```
    ### `sudo chown -R whoami /usr/local`
    **Note:** whoami should be enclosed within backticks (``).
    ### `sudo chown -R $(whoami) /usr/local`
    as sudoing homebrew is a bad idea (and doesn't work either) we have to reset the permissions within `/usr/local`
    Sudoing homebrew is a bad idea (and doesn't work either) we have to reset the permissions within `/usr/local`
    ```
    ~ $ sudo chown -R `whoami` /usr/local
    ```bash
    $ sudo chown -R $(whoami) /usr/local
    Password:
    ~$ brew link --overwrite node
    $ brew link --overwrite node
    Linking /usr/local/Cellar/node/0.10.4... 5 symlinks created
    ```

    WHOOPS IT WORKS! :-)
    IT WORKS! :-)

    ### STEPS

  2. @irazasyed irazasyed revised this gist Feb 2, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion homebrew-permissions-issue.md
    Original file line number Diff line number Diff line change
    @@ -70,4 +70,4 @@ WHOOPS IT WORKS! :-)

    `brew link --overwrite node`

    `sudo chown -R whoami /usr/local`
    `sudo chown -R $(whoami) /usr/local`
  3. @irazasyed irazasyed revised this gist Dec 1, 2013. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion homebrew-permissions-issue.md
    Original file line number Diff line number Diff line change
    @@ -2,9 +2,11 @@ Homebrew Permissions Denied Issues Solution
    ===========================================

    ### Installing and fixing node.JS
    ---

    `brew install node`


    ```
    ~$ brew install node
    ==> Downloading http://nodejs.org/dist/v0.10.4/node-v0.10.4.tar.gz
    @@ -42,9 +44,11 @@ Linking /usr/local/Cellar/node/0.10.4... Warning: Could not link node. Unlinking
    Error: Permission denied - /usr/local/lib/dtrace/node.d
    ```

    ### `sudo chown -R whoami /usr/local` - **Note:** whoami should be enclosed within backticks (``).
    ### `sudo chown -R whoami /usr/local`
    **Note:** whoami should be enclosed within backticks (``).

    as sudoing homebrew is a bad idea (and doesn't work either) we have to reset the permissions within `/usr/local`

    ```
    ~ $ sudo chown -R `whoami` /usr/local
    Password:
  4. @irazasyed irazasyed revised this gist Dec 1, 2013. 1 changed file with 14 additions and 5 deletions.
    19 changes: 14 additions & 5 deletions homebrew-permissions-issue.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    Homebrew Permissions Denied Issues Solution
    ===========================================

    - Installing and fixing node.JS
    ### Installing and fixing node.JS

    `brew install node`

    @@ -19,7 +19,7 @@ You can try again using `brew link node'
    🍺 /usr/local/Cellar/node/0.10.4: 951 files, 14M, built in 73 seconds
    ```

    - `brew link node`
    ### `brew link node`

    ```
    ~$ brew link node
    @@ -32,14 +32,17 @@ To force the link and delete this file, do:
    To list all files that would be deleted:
    brew link --overwrite --dry-run formula_name
    3) brew link --overwrite node
    ```

    ### `brew link --overwrite node`

    ```
    Linking /usr/local/Cellar/node/0.10.4... Warning: Could not link node. Unlinking...
    Error: Permission denied - /usr/local/lib/dtrace/node.d
    ```

    - `sudo chown -R whoami /usr/local` - **Note:** whoami should be enclosed within backticks (``).
    ### `sudo chown -R whoami /usr/local` - **Note:** whoami should be enclosed within backticks (``).

    as sudoing homebrew is a bad idea (and doesn't work either) we have to reset the permissions within `/usr/local`
    ```
    @@ -48,13 +51,19 @@ Password:
    ~$ brew link --overwrite node
    Linking /usr/local/Cellar/node/0.10.4... 5 symlinks created
    ```

    WHOOPS IT WORKS! :-)

    - STEPS
    ### STEPS

    `brew update`

    `brew upgrade`

    `brew cleanup`

    `brew install node`

    `brew link --overwrite node`

    `sudo chown -R whoami /usr/local`
  5. @irazasyed irazasyed created this gist Dec 1, 2013.
    60 changes: 60 additions & 0 deletions homebrew-permissions-issue.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,60 @@
    Homebrew Permissions Denied Issues Solution
    ===========================================

    - Installing and fixing node.JS

    `brew install node`

    ```
    ~$ brew install node
    ==> Downloading http://nodejs.org/dist/v0.10.4/node-v0.10.4.tar.gz
    Already downloaded: /Library/Caches/Homebrew/node-0.10.4.tar.gz
    ==> ./configure --prefix=/usr/local/Cellar/node/0.10.4
    ==> make install
    Warning: Could not link node. Unlinking...
    Error: The `brew link` step did not complete successfully
    The formula built, but is not symlinked into /usr/local
    You can try again using `brew link node'
    ==> Summary
    🍺 /usr/local/Cellar/node/0.10.4: 951 files, 14M, built in 73 seconds
    ```

    - `brew link node`

    ```
    ~$ brew link node
    Linking /usr/local/Cellar/node/0.10.4... Warning: Could not link node. Unlinking...
    Error: Could not symlink file: /usr/local/Cellar/node/0.10.4/lib/dtrace/node.d
    Target /usr/local/lib/dtrace/node.d already exists. You may need to delete it.
    To force the link and delete this file, do:
    brew link --overwrite formula_name
    To list all files that would be deleted:
    brew link --overwrite --dry-run formula_name
    3) brew link --overwrite node
    Linking /usr/local/Cellar/node/0.10.4... Warning: Could not link node. Unlinking...
    Error: Permission denied - /usr/local/lib/dtrace/node.d
    ```

    - `sudo chown -R whoami /usr/local` - **Note:** whoami should be enclosed within backticks (``).

    as sudoing homebrew is a bad idea (and doesn't work either) we have to reset the permissions within `/usr/local`
    ```
    ~ $ sudo chown -R `whoami` /usr/local
    Password:
    ~$ brew link --overwrite node
    Linking /usr/local/Cellar/node/0.10.4... 5 symlinks created
    ```
    WHOOPS IT WORKS! :-)

    - STEPS

    `brew update`
    `brew upgrade`
    `brew cleanup`
    `brew install node`
    `brew link --overwrite node`
    `sudo chown -R whoami /usr/local`