Awesome FOSS Logo
Discover awesome open source software
Launched 🚀🧑‍🚀

minor ursa + node-gyp issue

Categories

So I’ve been struggling with an issue in node-gyp for the better part of an hour now, and have just found the solution.

Context:

Here I am, trying to install the ursa library for node to handle some crypto, and for some reason, installs of ursa were failing with an EACCES error (which I think maybe should be EACCESS, but I will ignore that for now). The errors were very vague, and it took me a lot of debugging to reach this conclusion, but nonetheless it was fun to modify node source code and get my hands dirty (I looked in files like child_process.js, source code for node-gyp, ursa code).

While trying to npm install from my application directory (after adding ursa as a dependency), I was getting a failure installing ursa. Inspecting the command that was failing, which was printed (note, using npm with –verbose is a huge time-saver), it looked like a `node-gyp configure install` was the culprit. When I tried just `node-gyp configure`, I found that it errored out, with the myserious EACCES error ( seemingly the same as the one that was undoing my ursa package install).

I tried various things (checking the bindings file, changing various folder permissions), but finally came upon this solution:

The first problem I encountered was that the PYTHON variable was set to something wrong

At first, I was setting it wrongly in my ~/.bashrc file (I was using it in some calls to modpath), but even after changing that, the problem persisted. So, to circumvent, I unset the variable in my ~/.bashrc file.

The second problem I encountered was that the build/Release folder wasn’t present

I started thinking that this was caused by partial installs, and all the mucking about I was doing. A simple call to node-gyp clean (in the install folder for ursa) should have done the trick, but it wasn’t enough. I had to add these lines to install.js (for me, the npm install will fail without them):

``So I’ve been struggling with an issue in node-gyp for the better part of an hour now, and have just found the solution.

Context:

Here I am, trying to install the ursa library for node to handle some crypto, and for some reason, installs of ursa were failing with an EACCES error (which I think maybe should be EACCESS, but I will ignore that for now). The errors were very vague, and it took me a lot of debugging to reach this conclusion, but nonetheless it was fun to modify node source code and get my hands dirty (I looked in files like child_process.js, source code for node-gyp, ursa code).

While trying to npm install from my application directory (after adding ursa as a dependency), I was getting a failure installing ursa. Inspecting the command that was failing, which was printed (note, using npm with –verbose is a huge time-saver), it looked like a `node-gyp configure install` was the culprit. When I tried just `node-gyp configure`, I found that it errored out, with the myserious EACCES error ( seemingly the same as the one that was undoing my ursa package install).

I tried various things (checking the bindings file, changing various folder permissions), but finally came upon this solution:

The first problem I encountered was that the PYTHON variable was set to something wrong

At first, I was setting it wrongly in my ~/.bashrc file (I was using it in some calls to modpath), but even after changing that, the problem persisted. So, to circumvent, I unset the variable in my ~/.bashrc file.

The second problem I encountered was that the build/Release folder wasn’t present

I started thinking that this was caused by partial installs, and all the mucking about I was doing. A simple call to node-gyp clean (in the install folder for ursa) should have done the trick, but it wasn’t enough. I had to add these lines to install.js (for me, the npm install will fail without them):

``

Just like the code that ensured that the ‘bin’ folder existed, it looked like build/Release was not getting created.

Until this is properly debugged by maintainers of ursa, my workaround was to return to my app folder and do:

npm install /path/to/local/ursa/code

In my case, I modified the temp-directory that NPM was using (~/.npm/ursa/0.8.0/package). Haven’t tried to use ursa yet, but I’m hoping it worked.

The third issue I faced was that the fix above wasn’t a fix.

Unfortunately, doing the above gets you to a npm install that never really happened. To try and actually install ursa, I went back to npm’s ursa install and did the following:


Context:
  
Here I am, trying to install the ursa library for node to handle some crypto, and for some reason, installs of ursa were failing with an EACCES error (which I think maybe should be EACCESS, but I will ignore that for now). The errors were very vague, and it took me a lot of debugging to reach this conclusion, but nonetheless it was fun to modify node source code and get my hands dirty (I looked in files like child_process.js, source code for node-gyp, ursa code).

While trying to npm install from my application directory (after adding ursa as a dependency), I was getting a failure installing ursa. Inspecting the command that was failing, which was printed (note, using npm with –verbose is a huge time-saver), it looked like a \`node-gyp configure install\` was the culprit. When I tried just \`node-gyp configure\`, I found that it errored out, with the myserious EACCES error ( seemingly the same as the one that was undoing my ursa package install).

I tried various things (checking the bindings file, changing various folder permissions), but finally came upon this solution:

**The first problem I encountered was that the PYTHON variable was set to something wrong**
  
At first, I was setting it wrongly in my ~/.bashrc file (I was using it in some calls to modpath), but even after changing that, the problem persisted. So, to circumvent, I unset the variable in my ~/.bashrc file.

**The second problem I encountered was that the build/Release folder wasn’t present**
  
I started thinking that this was caused by partial installs, and all the mucking about I was doing. A simple call to node-gyp clean (in the install folder for ursa) should have done the trick, but it wasn’t enough. I had to add these lines to install.js (for me, the npm install will fail without them):

``So I’ve been struggling with an issue in node-gyp for the better part of an hour now, and have just found the solution.

Context:
  
Here I am, trying to install the ursa library for node to handle some crypto, and for some reason, installs of ursa were failing with an EACCES error (which I think maybe should be EACCESS, but I will ignore that for now). The errors were very vague, and it took me a lot of debugging to reach this conclusion, but nonetheless it was fun to modify node source code and get my hands dirty (I looked in files like child_process.js, source code for node-gyp, ursa code).

While trying to npm install from my application directory (after adding ursa as a dependency), I was getting a failure installing ursa. Inspecting the command that was failing, which was printed (note, using npm with –verbose is a huge time-saver), it looked like a \`node-gyp configure install\` was the culprit. When I tried just \`node-gyp configure\`, I found that it errored out, with the myserious EACCES error ( seemingly the same as the one that was undoing my ursa package install).

I tried various things (checking the bindings file, changing various folder permissions), but finally came upon this solution:

**The first problem I encountered was that the PYTHON variable was set to something wrong**
  
At first, I was setting it wrongly in my ~/.bashrc file (I was using it in some calls to modpath), but even after changing that, the problem persisted. So, to circumvent, I unset the variable in my ~/.bashrc file.

**The second problem I encountered was that the build/Release folder wasn’t present**
  
I started thinking that this was caused by partial installs, and all the mucking about I was doing. A simple call to node-gyp clean (in the install folder for ursa) should have done the trick, but it wasn’t enough. I had to add these lines to install.js (for me, the npm install will fail without them):

`` 

Just like the code that ensured that the ‘bin’ folder existed, it looked like build/Release was not getting created.

Until this is properly debugged by maintainers of ursa, my workaround was to return to my app folder and do:
  
npm install /path/to/local/ursa/code

In my case, I modified the temp-directory that NPM was using (~/.npm/ursa/0.8.0/package). Haven’t tried to use ursa yet, but I’m hoping it worked.

**The third issue I faced was that the fix above wasn’t a fix.**
  
Unfortunately, doing the above gets you to a npm install that never really happened. To try and actually install ursa, I went back to npm’s ursa install and did the following:

After doing that, I received an error about a linker.lock file not being present — I created that file with:


Context:
  
Here I am, trying to install the ursa library for node to handle some crypto, and for some reason, installs of ursa were failing with an EACCES error (which I think maybe should be EACCESS, but I will ignore that for now). The errors were very vague, and it took me a lot of debugging to reach this conclusion, but nonetheless it was fun to modify node source code and get my hands dirty (I looked in files like child_process.js, source code for node-gyp, ursa code).

While trying to npm install from my application directory (after adding ursa as a dependency), I was getting a failure installing ursa. Inspecting the command that was failing, which was printed (note, using npm with –verbose is a huge time-saver), it looked like a \`node-gyp configure install\` was the culprit. When I tried just \`node-gyp configure\`, I found that it errored out, with the myserious EACCES error ( seemingly the same as the one that was undoing my ursa package install).

I tried various things (checking the bindings file, changing various folder permissions), but finally came upon this solution:

**The first problem I encountered was that the PYTHON variable was set to something wrong**
  
At first, I was setting it wrongly in my ~/.bashrc file (I was using it in some calls to modpath), but even after changing that, the problem persisted. So, to circumvent, I unset the variable in my ~/.bashrc file.

**The second problem I encountered was that the build/Release folder wasn’t present**
  
I started thinking that this was caused by partial installs, and all the mucking about I was doing. A simple call to node-gyp clean (in the install folder for ursa) should have done the trick, but it wasn’t enough. I had to add these lines to install.js (for me, the npm install will fail without them):

``So I’ve been struggling with an issue in node-gyp for the better part of an hour now, and have just found the solution.

Context:
  
Here I am, trying to install the ursa library for node to handle some crypto, and for some reason, installs of ursa were failing with an EACCES error (which I think maybe should be EACCESS, but I will ignore that for now). The errors were very vague, and it took me a lot of debugging to reach this conclusion, but nonetheless it was fun to modify node source code and get my hands dirty (I looked in files like child_process.js, source code for node-gyp, ursa code).

While trying to npm install from my application directory (after adding ursa as a dependency), I was getting a failure installing ursa. Inspecting the command that was failing, which was printed (note, using npm with –verbose is a huge time-saver), it looked like a \`node-gyp configure install\` was the culprit. When I tried just \`node-gyp configure\`, I found that it errored out, with the myserious EACCES error ( seemingly the same as the one that was undoing my ursa package install).

I tried various things (checking the bindings file, changing various folder permissions), but finally came upon this solution:

**The first problem I encountered was that the PYTHON variable was set to something wrong**
  
At first, I was setting it wrongly in my ~/.bashrc file (I was using it in some calls to modpath), but even after changing that, the problem persisted. So, to circumvent, I unset the variable in my ~/.bashrc file.

**The second problem I encountered was that the build/Release folder wasn’t present**
  
I started thinking that this was caused by partial installs, and all the mucking about I was doing. A simple call to node-gyp clean (in the install folder for ursa) should have done the trick, but it wasn’t enough. I had to add these lines to install.js (for me, the npm install will fail without them):

`` 

Just like the code that ensured that the ‘bin’ folder existed, it looked like build/Release was not getting created.

Until this is properly debugged by maintainers of ursa, my workaround was to return to my app folder and do:
  
npm install /path/to/local/ursa/code

In my case, I modified the temp-directory that NPM was using (~/.npm/ursa/0.8.0/package). Haven’t tried to use ursa yet, but I’m hoping it worked.

**The third issue I faced was that the fix above wasn’t a fix.**
  
Unfortunately, doing the above gets you to a npm install that never really happened. To try and actually install ursa, I went back to npm’s ursa install and did the following:

```So I’ve been struggling with an issue in node-gyp for the better part of an hour now, and have just found the solution.

Context:
  
Here I am, trying to install the ursa library for node to handle some crypto, and for some reason, installs of ursa were failing with an EACCES error (which I think maybe should be EACCESS, but I will ignore that for now). The errors were very vague, and it took me a lot of debugging to reach this conclusion, but nonetheless it was fun to modify node source code and get my hands dirty (I looked in files like child_process.js, source code for node-gyp, ursa code).

While trying to npm install from my application directory (after adding ursa as a dependency), I was getting a failure installing ursa. Inspecting the command that was failing, which was printed (note, using npm with –verbose is a huge time-saver), it looked like a \`node-gyp configure install\` was the culprit. When I tried just \`node-gyp configure\`, I found that it errored out, with the myserious EACCES error ( seemingly the same as the one that was undoing my ursa package install).

I tried various things (checking the bindings file, changing various folder permissions), but finally came upon this solution:

**The first problem I encountered was that the PYTHON variable was set to something wrong**
  
At first, I was setting it wrongly in my ~/.bashrc file (I was using it in some calls to modpath), but even after changing that, the problem persisted. So, to circumvent, I unset the variable in my ~/.bashrc file.

**The second problem I encountered was that the build/Release folder wasn’t present**
  
I started thinking that this was caused by partial installs, and all the mucking about I was doing. A simple call to node-gyp clean (in the install folder for ursa) should have done the trick, but it wasn’t enough. I had to add these lines to install.js (for me, the npm install will fail without them):

``So I’ve been struggling with an issue in node-gyp for the better part of an hour now, and have just found the solution.

Context:
  
Here I am, trying to install the ursa library for node to handle some crypto, and for some reason, installs of ursa were failing with an EACCES error (which I think maybe should be EACCESS, but I will ignore that for now). The errors were very vague, and it took me a lot of debugging to reach this conclusion, but nonetheless it was fun to modify node source code and get my hands dirty (I looked in files like child_process.js, source code for node-gyp, ursa code).

While trying to npm install from my application directory (after adding ursa as a dependency), I was getting a failure installing ursa. Inspecting the command that was failing, which was printed (note, using npm with –verbose is a huge time-saver), it looked like a \`node-gyp configure install\` was the culprit. When I tried just \`node-gyp configure\`, I found that it errored out, with the myserious EACCES error ( seemingly the same as the one that was undoing my ursa package install).

I tried various things (checking the bindings file, changing various folder permissions), but finally came upon this solution:

**The first problem I encountered was that the PYTHON variable was set to something wrong**
  
At first, I was setting it wrongly in my ~/.bashrc file (I was using it in some calls to modpath), but even after changing that, the problem persisted. So, to circumvent, I unset the variable in my ~/.bashrc file.

**The second problem I encountered was that the build/Release folder wasn’t present**
  
I started thinking that this was caused by partial installs, and all the mucking about I was doing. A simple call to node-gyp clean (in the install folder for ursa) should have done the trick, but it wasn’t enough. I had to add these lines to install.js (for me, the npm install will fail without them):

`` 

Just like the code that ensured that the ‘bin’ folder existed, it looked like build/Release was not getting created.

Until this is properly debugged by maintainers of ursa, my workaround was to return to my app folder and do:
  
npm install /path/to/local/ursa/code

In my case, I modified the temp-directory that NPM was using (~/.npm/ursa/0.8.0/package). Haven’t tried to use ursa yet, but I’m hoping it worked.

**The third issue I faced was that the fix above wasn’t a fix.**
  
Unfortunately, doing the above gets you to a npm install that never really happened. To try and actually install ursa, I went back to npm’s ursa install and did the following:

``` 

After doing that, I received an error about a linker.lock file not being present — I created that file with:

After this, running make from path/to/ursa/build went smoothly, populating build/Release.

From there, I went out one directory (path/to/ursa) and performed:


Context:
  
Here I am, trying to install the ursa library for node to handle some crypto, and for some reason, installs of ursa were failing with an EACCES error (which I think maybe should be EACCESS, but I will ignore that for now). The errors were very vague, and it took me a lot of debugging to reach this conclusion, but nonetheless it was fun to modify node source code and get my hands dirty (I looked in files like child_process.js, source code for node-gyp, ursa code).

While trying to npm install from my application directory (after adding ursa as a dependency), I was getting a failure installing ursa. Inspecting the command that was failing, which was printed (note, using npm with –verbose is a huge time-saver), it looked like a \`node-gyp configure install\` was the culprit. When I tried just \`node-gyp configure\`, I found that it errored out, with the myserious EACCES error ( seemingly the same as the one that was undoing my ursa package install).

I tried various things (checking the bindings file, changing various folder permissions), but finally came upon this solution:

**The first problem I encountered was that the PYTHON variable was set to something wrong**
  
At first, I was setting it wrongly in my ~/.bashrc file (I was using it in some calls to modpath), but even after changing that, the problem persisted. So, to circumvent, I unset the variable in my ~/.bashrc file.

**The second problem I encountered was that the build/Release folder wasn’t present**
  
I started thinking that this was caused by partial installs, and all the mucking about I was doing. A simple call to node-gyp clean (in the install folder for ursa) should have done the trick, but it wasn’t enough. I had to add these lines to install.js (for me, the npm install will fail without them):

``So I’ve been struggling with an issue in node-gyp for the better part of an hour now, and have just found the solution.

Context:
  
Here I am, trying to install the ursa library for node to handle some crypto, and for some reason, installs of ursa were failing with an EACCES error (which I think maybe should be EACCESS, but I will ignore that for now). The errors were very vague, and it took me a lot of debugging to reach this conclusion, but nonetheless it was fun to modify node source code and get my hands dirty (I looked in files like child_process.js, source code for node-gyp, ursa code).

While trying to npm install from my application directory (after adding ursa as a dependency), I was getting a failure installing ursa. Inspecting the command that was failing, which was printed (note, using npm with –verbose is a huge time-saver), it looked like a \`node-gyp configure install\` was the culprit. When I tried just \`node-gyp configure\`, I found that it errored out, with the myserious EACCES error ( seemingly the same as the one that was undoing my ursa package install).

I tried various things (checking the bindings file, changing various folder permissions), but finally came upon this solution:

**The first problem I encountered was that the PYTHON variable was set to something wrong**
  
At first, I was setting it wrongly in my ~/.bashrc file (I was using it in some calls to modpath), but even after changing that, the problem persisted. So, to circumvent, I unset the variable in my ~/.bashrc file.

**The second problem I encountered was that the build/Release folder wasn’t present**
  
I started thinking that this was caused by partial installs, and all the mucking about I was doing. A simple call to node-gyp clean (in the install folder for ursa) should have done the trick, but it wasn’t enough. I had to add these lines to install.js (for me, the npm install will fail without them):

`` 

Just like the code that ensured that the ‘bin’ folder existed, it looked like build/Release was not getting created.

Until this is properly debugged by maintainers of ursa, my workaround was to return to my app folder and do:
  
npm install /path/to/local/ursa/code

In my case, I modified the temp-directory that NPM was using (~/.npm/ursa/0.8.0/package). Haven’t tried to use ursa yet, but I’m hoping it worked.

**The third issue I faced was that the fix above wasn’t a fix.**
  
Unfortunately, doing the above gets you to a npm install that never really happened. To try and actually install ursa, I went back to npm’s ursa install and did the following:

```So I’ve been struggling with an issue in node-gyp for the better part of an hour now, and have just found the solution.

Context:
  
Here I am, trying to install the ursa library for node to handle some crypto, and for some reason, installs of ursa were failing with an EACCES error (which I think maybe should be EACCESS, but I will ignore that for now). The errors were very vague, and it took me a lot of debugging to reach this conclusion, but nonetheless it was fun to modify node source code and get my hands dirty (I looked in files like child_process.js, source code for node-gyp, ursa code).

While trying to npm install from my application directory (after adding ursa as a dependency), I was getting a failure installing ursa. Inspecting the command that was failing, which was printed (note, using npm with –verbose is a huge time-saver), it looked like a \`node-gyp configure install\` was the culprit. When I tried just \`node-gyp configure\`, I found that it errored out, with the myserious EACCES error ( seemingly the same as the one that was undoing my ursa package install).

I tried various things (checking the bindings file, changing various folder permissions), but finally came upon this solution:

**The first problem I encountered was that the PYTHON variable was set to something wrong**
  
At first, I was setting it wrongly in my ~/.bashrc file (I was using it in some calls to modpath), but even after changing that, the problem persisted. So, to circumvent, I unset the variable in my ~/.bashrc file.

**The second problem I encountered was that the build/Release folder wasn’t present**
  
I started thinking that this was caused by partial installs, and all the mucking about I was doing. A simple call to node-gyp clean (in the install folder for ursa) should have done the trick, but it wasn’t enough. I had to add these lines to install.js (for me, the npm install will fail without them):

``So I’ve been struggling with an issue in node-gyp for the better part of an hour now, and have just found the solution.

Context:
  
Here I am, trying to install the ursa library for node to handle some crypto, and for some reason, installs of ursa were failing with an EACCES error (which I think maybe should be EACCESS, but I will ignore that for now). The errors were very vague, and it took me a lot of debugging to reach this conclusion, but nonetheless it was fun to modify node source code and get my hands dirty (I looked in files like child_process.js, source code for node-gyp, ursa code).

While trying to npm install from my application directory (after adding ursa as a dependency), I was getting a failure installing ursa. Inspecting the command that was failing, which was printed (note, using npm with –verbose is a huge time-saver), it looked like a \`node-gyp configure install\` was the culprit. When I tried just \`node-gyp configure\`, I found that it errored out, with the myserious EACCES error ( seemingly the same as the one that was undoing my ursa package install).

I tried various things (checking the bindings file, changing various folder permissions), but finally came upon this solution:

**The first problem I encountered was that the PYTHON variable was set to something wrong**
  
At first, I was setting it wrongly in my ~/.bashrc file (I was using it in some calls to modpath), but even after changing that, the problem persisted. So, to circumvent, I unset the variable in my ~/.bashrc file.

**The second problem I encountered was that the build/Release folder wasn’t present**
  
I started thinking that this was caused by partial installs, and all the mucking about I was doing. A simple call to node-gyp clean (in the install folder for ursa) should have done the trick, but it wasn’t enough. I had to add these lines to install.js (for me, the npm install will fail without them):

`` 

Just like the code that ensured that the ‘bin’ folder existed, it looked like build/Release was not getting created.

Until this is properly debugged by maintainers of ursa, my workaround was to return to my app folder and do:
  
npm install /path/to/local/ursa/code

In my case, I modified the temp-directory that NPM was using (~/.npm/ursa/0.8.0/package). Haven’t tried to use ursa yet, but I’m hoping it worked.

**The third issue I faced was that the fix above wasn’t a fix.**
  
Unfortunately, doing the above gets you to a npm install that never really happened. To try and actually install ursa, I went back to npm’s ursa install and did the following:

``` 

After doing that, I received an error about a linker.lock file not being present — I created that file with:

````So I’ve been struggling with an issue in node-gyp for the better part of an hour now, and have just found the solution.

Context:
  
Here I am, trying to install the ursa library for node to handle some crypto, and for some reason, installs of ursa were failing with an EACCES error (which I think maybe should be EACCESS, but I will ignore that for now). The errors were very vague, and it took me a lot of debugging to reach this conclusion, but nonetheless it was fun to modify node source code and get my hands dirty (I looked in files like child_process.js, source code for node-gyp, ursa code).

While trying to npm install from my application directory (after adding ursa as a dependency), I was getting a failure installing ursa. Inspecting the command that was failing, which was printed (note, using npm with –verbose is a huge time-saver), it looked like a \`node-gyp configure install\` was the culprit. When I tried just \`node-gyp configure\`, I found that it errored out, with the myserious EACCES error ( seemingly the same as the one that was undoing my ursa package install).

I tried various things (checking the bindings file, changing various folder permissions), but finally came upon this solution:

**The first problem I encountered was that the PYTHON variable was set to something wrong**
  
At first, I was setting it wrongly in my ~/.bashrc file (I was using it in some calls to modpath), but even after changing that, the problem persisted. So, to circumvent, I unset the variable in my ~/.bashrc file.

**The second problem I encountered was that the build/Release folder wasn’t present**
  
I started thinking that this was caused by partial installs, and all the mucking about I was doing. A simple call to node-gyp clean (in the install folder for ursa) should have done the trick, but it wasn’t enough. I had to add these lines to install.js (for me, the npm install will fail without them):

``So I’ve been struggling with an issue in node-gyp for the better part of an hour now, and have just found the solution.

Context:
  
Here I am, trying to install the ursa library for node to handle some crypto, and for some reason, installs of ursa were failing with an EACCES error (which I think maybe should be EACCESS, but I will ignore that for now). The errors were very vague, and it took me a lot of debugging to reach this conclusion, but nonetheless it was fun to modify node source code and get my hands dirty (I looked in files like child_process.js, source code for node-gyp, ursa code).

While trying to npm install from my application directory (after adding ursa as a dependency), I was getting a failure installing ursa. Inspecting the command that was failing, which was printed (note, using npm with –verbose is a huge time-saver), it looked like a \`node-gyp configure install\` was the culprit. When I tried just \`node-gyp configure\`, I found that it errored out, with the myserious EACCES error ( seemingly the same as the one that was undoing my ursa package install).

I tried various things (checking the bindings file, changing various folder permissions), but finally came upon this solution:

**The first problem I encountered was that the PYTHON variable was set to something wrong**
  
At first, I was setting it wrongly in my ~/.bashrc file (I was using it in some calls to modpath), but even after changing that, the problem persisted. So, to circumvent, I unset the variable in my ~/.bashrc file.

**The second problem I encountered was that the build/Release folder wasn’t present**
  
I started thinking that this was caused by partial installs, and all the mucking about I was doing. A simple call to node-gyp clean (in the install folder for ursa) should have done the trick, but it wasn’t enough. I had to add these lines to install.js (for me, the npm install will fail without them):

`` 

Just like the code that ensured that the ‘bin’ folder existed, it looked like build/Release was not getting created.

Until this is properly debugged by maintainers of ursa, my workaround was to return to my app folder and do:
  
npm install /path/to/local/ursa/code

In my case, I modified the temp-directory that NPM was using (~/.npm/ursa/0.8.0/package). Haven’t tried to use ursa yet, but I’m hoping it worked.

**The third issue I faced was that the fix above wasn’t a fix.**
  
Unfortunately, doing the above gets you to a npm install that never really happened. To try and actually install ursa, I went back to npm’s ursa install and did the following:

```So I’ve been struggling with an issue in node-gyp for the better part of an hour now, and have just found the solution.

Context:
  
Here I am, trying to install the ursa library for node to handle some crypto, and for some reason, installs of ursa were failing with an EACCES error (which I think maybe should be EACCESS, but I will ignore that for now). The errors were very vague, and it took me a lot of debugging to reach this conclusion, but nonetheless it was fun to modify node source code and get my hands dirty (I looked in files like child_process.js, source code for node-gyp, ursa code).

While trying to npm install from my application directory (after adding ursa as a dependency), I was getting a failure installing ursa. Inspecting the command that was failing, which was printed (note, using npm with –verbose is a huge time-saver), it looked like a \`node-gyp configure install\` was the culprit. When I tried just \`node-gyp configure\`, I found that it errored out, with the myserious EACCES error ( seemingly the same as the one that was undoing my ursa package install).

I tried various things (checking the bindings file, changing various folder permissions), but finally came upon this solution:

**The first problem I encountered was that the PYTHON variable was set to something wrong**
  
At first, I was setting it wrongly in my ~/.bashrc file (I was using it in some calls to modpath), but even after changing that, the problem persisted. So, to circumvent, I unset the variable in my ~/.bashrc file.

**The second problem I encountered was that the build/Release folder wasn’t present**
  
I started thinking that this was caused by partial installs, and all the mucking about I was doing. A simple call to node-gyp clean (in the install folder for ursa) should have done the trick, but it wasn’t enough. I had to add these lines to install.js (for me, the npm install will fail without them):

``So I’ve been struggling with an issue in node-gyp for the better part of an hour now, and have just found the solution.

Context:
  
Here I am, trying to install the ursa library for node to handle some crypto, and for some reason, installs of ursa were failing with an EACCES error (which I think maybe should be EACCESS, but I will ignore that for now). The errors were very vague, and it took me a lot of debugging to reach this conclusion, but nonetheless it was fun to modify node source code and get my hands dirty (I looked in files like child_process.js, source code for node-gyp, ursa code).

While trying to npm install from my application directory (after adding ursa as a dependency), I was getting a failure installing ursa. Inspecting the command that was failing, which was printed (note, using npm with –verbose is a huge time-saver), it looked like a \`node-gyp configure install\` was the culprit. When I tried just \`node-gyp configure\`, I found that it errored out, with the myserious EACCES error ( seemingly the same as the one that was undoing my ursa package install).

I tried various things (checking the bindings file, changing various folder permissions), but finally came upon this solution:

**The first problem I encountered was that the PYTHON variable was set to something wrong**
  
At first, I was setting it wrongly in my ~/.bashrc file (I was using it in some calls to modpath), but even after changing that, the problem persisted. So, to circumvent, I unset the variable in my ~/.bashrc file.

**The second problem I encountered was that the build/Release folder wasn’t present**
  
I started thinking that this was caused by partial installs, and all the mucking about I was doing. A simple call to node-gyp clean (in the install folder for ursa) should have done the trick, but it wasn’t enough. I had to add these lines to install.js (for me, the npm install will fail without them):

`` 

Just like the code that ensured that the ‘bin’ folder existed, it looked like build/Release was not getting created.

Until this is properly debugged by maintainers of ursa, my workaround was to return to my app folder and do:
  
npm install /path/to/local/ursa/code

In my case, I modified the temp-directory that NPM was using (~/.npm/ursa/0.8.0/package). Haven’t tried to use ursa yet, but I’m hoping it worked.

**The third issue I faced was that the fix above wasn’t a fix.**
  
Unfortunately, doing the above gets you to a npm install that never really happened. To try and actually install ursa, I went back to npm’s ursa install and did the following:

``` 

After doing that, I received an error about a linker.lock file not being present — I created that file with:

```` 

After this, running make from path/to/ursa/build went smoothly, populating build/Release.

From there, I went out one directory (path/to/ursa) and performed:

This seems to have properly installed ursa (ursaNative.node is in path/to/ursa/bin).

You will need to copy your fixed version of the package (path/to/ursa) to your project directory (or somewhere safe), and to node_modules.

Sorry for the wild ride, this was mostly written as I was actually going through the problems and trying to solve… Hope this helps someone who’s stuck