-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Mac install hexo use sudo but sitll permission denied #2785
Comments
me too |
1 similar comment
me too |
Rule 1: do not use
and never run |
@JLHwung is right,Thanks. My operation:
and then:
the result is ok ,hexo installed:
|
@JLHwung @anming-john , Thanks! I find this solution for a day, now I have solved the problem! |
@JLHwung Thanks so much , it really work for me! |
I arrived here after having this problem with npm and want to provide the correct answer. Never use sudo to install modules. Running sudo allows anything to happen which is very dangerous. And simply changing ownership of the folder which is outside your home directory will potentially cause trouble if you ever change to a different user account. What you want to do is configure npm so that it uses a directory within your home directory. See the docs on the npm website for the current instructions. |
try this |
Whats Hexo? Is it like a botter or what is it? |
Environment Info
usr/local/bin/hexo -> /usr/local/lib/node_modules/hexo-cli/bin/hexo
[email protected] install /usr/local/lib/node_modules/hexo-cli/node_modules/dtrace-provider
node scripts/install.js
fs.js:809
return binding.rename(pathModule._makeLong(oldPath),
^
Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/hexo-cli/node_modules/dtrace-provider/compile.py' -> '/usr/local/lib/node_modules/hexo-cli/node_modules/dtrace-provider/binding.gyp'
at Error (native)
at Object.fs.renameSync (fs.js:809:18)
at Object. (/usr/local/lib/node_modules/hexo-cli/node_modules/dtrace-provider/scripts/install.js:14:4)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
[fsevents] Success: "/usr/local/lib/node_modules/hexo-cli/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
sh: highlight_alias.json: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build:highlight:
node scripts/build_highlight_alias.js > highlight_alias.json
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build:highlight script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
┌───────────────────────────────────────────────────────────────┐$USER:$ (id -gn $USER) /Users/wanganming/.config │
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R
└───────────────────────────────────────────────────────────────┘
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/hexo-cli/node_modules/dtrace-provider):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install:
node scripts/install.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall:
npm run build:highlight
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/wanganming/.npm/_logs/2017-10-01T08_53_40_892Z-debug.log
Node version(
node -v
):v6.9.5
Your site
_config.yml
(Optional):Your theme
_config.yml
(Optional):Hexo and Plugin version(
npm ls --depth 0
):For BUG
For question
For feature request
The text was updated successfully, but these errors were encountered: