安装curlftpfs, 需要安装对应的依赖项
- libffi-3.2.1.tar.gz
- glib-2.46.2.tar.xz
- fuse-2.9.4.tar.gz
- curl-7.46.0.tar.gz
- curlftpfs-0.9.2.tar.gz
下载libffi编译安装
./configure
make
make install
下载安装glib
./configure
make
make install
./configure阶段可能会报如下错误
No package ‘libffi’ found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables LIBFFI_CFLAGS
and LIBFFI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.
这个设置环境变量并没有达到预期的效果,所以将libffi从新安装了一下
./configure --prefix=/usr
make
make install
这个问题解决
重新./configure glib编译通过,之后make make install 一切顺利
下载并安装fuse configure编译时报错
configure: running /bin/bash ./configure ‘–prefix=/usr/local’ –cache-file=/dev/null –srcdir=.
checking for a BSD-compatible install… /usr/bin/install -c
checking kernel source directory… /usr/src/linux-headers-3.13.0-39-generic
checking kernel build directory… /usr/src/linux-headers-3.13.0-39-generic
checking kernel source version… Not found
configure: error:
- Cannot determine the version of the linux kernel source. Please
- prepare the kernel before running this script
configure: error: ./configure failed for kernel
查看系统内核版本: root@ubuntu:~/mountftp/fuse-2.7.0# cat /proc/version
Linux version 3.13.0-39-generic (buildd@toyol) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #66-Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014
查看linux机器内核版本和fuse版本不一致,下载最新的fuse版本编译通过
下载fuse版本:fuse-2.9.4
之后make make install 一切顺利
下载并安装curl: configure make make install 一切顺利
下载安装curlftpfs ./configure make make install 一切顺利
此时curlftpfs已经安装成功,可以直接使用了
curlftpfs使用范例:
curlftpfs -o codepage=utf8 ftp://user:passwd@ip:port ./ftp
指定编码格式 指定用户名 密码 地址端口 和挂载位置
取消挂载umount ./ftp
挂载时候也可以直接挂在具体的位置
curlftpfs -o codepage=utf8 ftp://user:passwd@ip:port/path ./ftp