如何从Raspberry Pi 3中删除Homebridge。

pi@Development:~ $ sudo npm uninstall homebridge
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.

我也试图删除它而不是sudo。结果更长,但仍然没有运气。
pi@Development:~ $ npm uninstall homebridge
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.
npm ERR! Linux 4.4.21-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "uninstall" "homebridge"
npm ERR! node v7.3.0
npm ERR! npm v4.0.5
npm ERR! path /home/pi/node_modules/.staging
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir
npm ERR! Error: EACCES: permission denied, mkdir '/home/pi/node_modules/.staging'
npm ERR! { Error: EACCES: permission denied, mkdir '/home/pi/node_modules/.staging'
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/home/pi/node_modules/.staging' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/npm-debug.log

最佳答案

您可以以root身份全局执行此操作:

sudo npm uninstall -g homebridge

Homebridge的配置文件存储在〜/.homebridge中(如果您使用默认用户“pi”,则目录为/home/pi/.homebridge)

关于raspberry-pi3 - 如何在Raspberry Pi上删除Homebridge,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/41347971/

10-11 19:56