尝试写入 `/opt/wpscan/.bundle/config` 时出错。您可能需要授予该路径的写入权限

问题描述 投票:0回答:3

你好,我使用谷歌云实例来运行我的代码,

techonepl@instance-1:/opt/wpscan$ sudo gem install bundler && bundle install --without test
Fetching: bundler-1.14.6.gem (100%)
Successfully installed bundler-1.14.6
Parsing documentation for bundler-1.14.6
Installing ri documentation for bundler-1.14.6
Done installing documentation for bundler after 7 seconds
1 gem installed
There was an error while trying to write to
/opt/wpscan/.bundle/config
. It is likely that you need to grant write permissions for that path.
即使我使用 sudo 运行它,我还需要授予什么? 系统信息:Ubuntu 14.04 Trusty 2GB内存 在谷歌云上运行。 我正在尝试安装“wpscan”

ruby linux ubuntu-14.04
3个回答
8
投票

修复它

curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.2.3
rvm use 2.2.3 --default
echo "gem: --no-ri --no-rdoc" > ~/.gemrc
gem install bundler

sudo chmod -R 777 /opt/wpscan/.bundle

工作正常,谢谢。


1
投票
sudo chmod -R 777 /opt/wpscan/.bundle

0
投票

设置环境变量

BUNDLE_PATH
为用户有权限写入的文件夹,例如

export BUNDLE_PATH=$HOME/.bundle/

GitHub问题

© www.soinside.com 2019 - 2024. All rights reserved.