CentOS 7 如何挂载 Google Drive

一、背景

Google Drive 即 GDrive 是谷歌家的云盘产品,官方网站:https://drive.google.com,新注册账号默认 15G 免费,教育版无限空间,官方支持 WindowsiOSAndroid 客户端同步,那么如何在 Linux 下使用谷歌的超大云盘呢?

二、安装

本教程基于 CentOS 7.3
相关软件版本:pip 8.1.2/python 2.7.5
项目主页:dsoprea/GDriveFS

1、安装依赖

# yum -y install gcc gcc-c++ python-devel libxslt-devel libffi-devel openssl-devel fuse fuse-devel

2、安装 Google API

# git clone https://github.com/google/google-api-python-client
# cd google-api-python-client
# python setup.py install
# python setup.py install_egg_info

3、安装 GDriveFS

# pip install gdrivefs

三、使用

1、登录

# gdfstool auth -u
To authorize FUSE to use your Google Drive account...

将显示的 URL 贴到网页,会显示授权页面,授权后显示授权码,拷贝完整授权码待用

# gdfstool auth -a /var/cache/gdfs.creds "刚拷贝的完整授权码"
Authorization code recorded

2、挂载

# mkdir /mnt/gdrivefs
# gdfstool mount /var/cache/gdfs.creds /mnt/gdrivefs

四、问题摘要

1、问:greenlet.h:8:20: fatal error: Python.h: No such file or directory
答:

#  yum install python-devel -y

2、问:OSError: [Errno 2] No such file or directory: '/usr/lib/python2.7/site-packages/google_api_python_client-1.6.2-py2.7.egg'
答:

# yum install libffi-devel -y

3、问:ImportError: cannot import name util
答:

# pip install oauth2client==2.2.0

注:可能会提示:OSError: [Errno 2] No such file or directory: '/usr/lib/python2.7/site-packages/oauth2client-4.1.1-py2.7.egg',可无视,因为我们装的是 2.2.0 版本。


ArmxMod for Typecho
个性化、自适应、功能强大的响应式主题

推广

 继续浏览关于 Googlecentos硬盘gdrive云盘网盘谷歌drivegdrivefs 的文章

 本文最后更新于 2018/06/07 13:16:39,可能因经年累月而与现状有所差异

 引用转载请注明: VirCloud's Blog > 系统 > CentOS 7 如何挂载 Google Drive

精选评论

  1. W
    W 回复

    Mac OS X 10_13_1Chrome 63.0.3239.84来自 佛罗里达 的大神

    感谢分享,就是唉,这个代码太难复制了。

    1. VirCloud

      屏蔽了右键菜单,现在取消了,嘻嘻~