今天需要在centos上安装baidupcs,遇到了如下问题
如我另外一片文章https://blog.csdn.net/wq3028/article/details/79085862
首先执行获取源码,执行
git clone https://github.com/GangZhuo/BaiduPCS.git编译源代码
cd BaiduPCS ./configure进行配置 会报错 这里安装curl之后就能解决了 baidupcs主要依赖curl,在ubuntu上安装这个libcurl4-openssl-dev包就可以了 在centos中执行yum search libcurl 搜索到 Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. Loading mirror speeds from cached hostfile * epel: ftp.cuhk.edu.hk ======================================================= N/S matched: libcurl ======================================================= libcurl-devel.i686 : Files needed for building applications with libcurl libcurl-devel.x86_64 : Files needed for building applications with libcurl curlftpfs.x86_64 : CurlFtpFS is a filesystem for accessing FTP hosts based on FUSE and libcurl libcurl.i686 : A library for getting files from web servers libcurl.x86_64 : A library for getting files from web servers mingw32-curl.noarch : MinGW Windows port of curl and libcurl mingw64-curl.noarch : MinGW Windows port of curl and libcurl perl-WWW-Curl.x86_64 : Perl extension interface for libcurl python-pycurl.x86_64 : A Python interface to libcurl python34-pycurl.x86_64 : Python interface to libcurl for Python 3 rubygem-curb.x86_64 : Ruby libcurl bindings uget.x86_64 : Download manager using GTK+ and libcurl
Name and summary matches only, use “search all” for everything.
这里我们使用的x86的系统所以安装libcurl.x86_64和libcurl-devel.x86_64
yum install libcurl.x86_64 libcurl-devel.x86_64 ./configure make然后执行make 发现报错如下 [root@localhost BaiduPCS]# make CDPATH=”${ZSH_VERSION+.}:” && cd . && /bin/sh /root/temp/BaiduPCS/build-aux/missing aclocal-1.15 -I m4 /root/temp/BaiduPCS/build-aux/missing: line 81: aclocal-1.15: command not found WARNING: ‘aclocal-1.15’ is missing on your system. You should only need it if you modified ‘acinclude.m4’ or ‘configure.ac’ or m4 files included by ‘configure.ac’. The ‘aclocal’ program is part of the GNU Automake package: http://www.gnu.org/software/automake It also requires GNU Autoconf, GNU m4 and Perl in order to run: http://www.gnu.org/software/autoconf http://www.gnu.org/software/m4/ http://www.perl.org/ make: * [aclocal.m4] Error 127
经过查找发现缺少automake这个包,手动安装既可
wget ftp://mirrors.ustc.edu.cn/gnu/automake/automake-1.15.tar.xz tar xf automake-1.15.tar.xz cd automake-1.15/ ./configure && make && make install安装后再次进入baidupcs路径
cd BaiduPCS/ make make install 安装成功之后正常使用[root@localhost BaiduPCS]# baidupcs pcs v0.3.1 (API v1.1.5)baidupcs
Usage: baidupcs command [options] [arg1|arg2…]
Description: The baidupcs is client of baidu net disk. It supplied many functions, which can manage baidu net disk on terminal, such as ls, cp, rm, mv, rename, download, upload, search and so on. The baidupcs provided AES encryption, which can protected your data. The baidupcs is open source, and published on MIT. Please see https://github.com/GangZhuo/baidupcs.
Options: –context= Specify context.
Commands: cat Print the file content cd Change the work directory copy Copy the file|directory compare Print the differents between local and net disk context Print the context download Download the file echo Write the text into net disk file encode Encrypt/decrypt the file fix Fix file base md5 and scrap help Print the usage list List the directory login Login logout Logout meta Print the file|directory meta information mkdir Make a new directory move Move the file|directory into other file|directory pwd Print the current work directory quota Print the quota remove Remove the file|directory rename Rename the file|directory set Change the context, you can print the context by ‘context’ command search Search the files in the specify directory synch Synch between local and net disk. You can ‘compare’ first. upload Upload the file version Print the version who Print the current user Use ‘baidupcs -h’ to print command usage. Sample: baidupcs help baidupcs help cat baidupcs cat -h baidupcs cat /note.txt baidupcs cd /temp baidupcs cat /note.txt –context=/home/gang/.pcs_context
