如何从 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
尝试其中一个,当其他方法都不起作用时,它们似乎对我有用。 (或者至少我没有收到错误消息,当我尝试返回 Homebridge 时,我确实收到了错误,所以我认为它有效。)
要删除 Homebridge 服务,请运行以下命令:
sudo hb-service uninstall
要删除 Homebridge 和 Homebridge Config UI X,请运行以下命令:
sudo npm uninstall -g homebridge homebridge-config-ui-x
您可以以root身份全局执行此操作:
sudo npm uninstall -g homebridge
Homebridge 的配置文件存储在 ~/.homebridge 中(如果您使用默认用户“pi”,则该目录为 /home/pi/.homebridge)
这些对我来说都不起作用,卸载 homebridge 后,homebridge 和 hb-config 仍然在 /usr/local/bin/ 中。我需要完全删除它,以便我可以尝试重新安装它,因为它完全被阻止了。
🍰 pi@pi4 % sudo npm uninstall -g homebridge homebridge-config-ui
up to date, audited 1 package in 878ms
found 0 vulnerabilities
🍰 pi@pi4 % ls -ls /usr/local/bin/homebridge
0 lrwxrwxrwx 1 root root 45 Oct 2 2019 /usr/local/bin/homebridge -> ../lib/node_modules/homebridge/bin/homebridge
🍰 pi@pi4 %