准备:国外 vps(10 刀/year,1G-20g-kvm-centos7.3),edu 邮箱的 google 无限容量网盘
注意事项:GDriveFS是Python 2.7开发的,需要你安装Python2.7以上版本
解决方案:
http://blog.csdn.net/jcjc918/article/details/11022345
https://blog.fazero.me/2016/10/13/centos-update-python
安装 fuse
64 位:sudo yum install fuse-devel.x86_64 fuse.x86_64
32 位:sudo yum install fuse-devel.i686 fuse.i686
安装 gdrivefs: pip install gdrivefs
pip 是 python 的包管理工具请先安装它
出现[pip: command not found]解决方案:
- 安装 epel 源:
yum -y install epel-release
- 安装 pip:
yum -y install python-pip
- 清理一下缓存:
yum clean all
出现提示【You should consider upgrading via the 'pip install --upgrade pip' command.】,解决方案、
升级 pip:pip install --upgrade pip
出现出现错误【error: command 'gcc' failed with exit status 1】,解决方案
安装各种组件:
yum -y install gcc gcc-c++ kernel-devel
yum -y install python-devel libxslt-devel libffi-devel openssl-devel
安装完成
运行得到认证接口
shell:gdfstool auth -u
拷贝你终端出现网址到浏览器,会出现授权页面
google 邮箱登录授权后,得到授权码:
linux 认证
shell:gdfstool auth -a /var/cache/gdfs.creds "你的授权码"
认证 ok,出现【Authorization code recorded.】
挂载网盘
新建目录:mkdir /mnt/gdrivefs
网盘挂载到目录:gdfstool mount /var/cache/gdfs.creds /mnt/gdrivefs
然后就可以把网盘当磁盘用了
log
fuse: device not found, try 'modprobe fuse' first
Traceback (most recent call last):
File "/usr/local/bin/gdfstool", line 125, in
main()
File "/usr/local/bin/gdfstool", line 120, in main
\_handle\_mountpoint(args)
File "/usr/local/bin/gdfstool", line 72, in \_handle\_mountpoint
option\_string=option\_string)
File "/usr/local/lib/python2.7/dist-packages/gdrivefs/gdfs/gdfuse.py", line 872, in mount
**fuse_opts)
File "/usr/local/lib/python2.7/dist-packages/fuse.py", line 399, in **init**
raise RuntimeError(err)
RuntimeError: 1
基本是内核和fuse版本冲突,升级内核即可,openvz不支持改内核
log
httplib2.SSLHandshakeError: \[SSL: CERTIFICATE\_VERIFY\_FAILED\] certificate verify failed (_ssl.c:579)```
`请pip升级httplib2`
==========================end======================
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于