如何安装支持 Samba 的 MC (Midnight Commander)(smb:// 链接,类似 ftp)。我无法使用 apt-get 安装它。我只有 mc 版本,没有 smb。从源安装失败。我尝试用谷歌搜索,但没有成功。
我在 Ubuntu 11 上(实际上是在 XBMC 11 上,但它像 Ubuntu)。谢谢。
答案1
下载源代码并构建依赖项:
mkdir ~/.mc
cd !$
apt-get source mc
sudo apt-get build-dep mc
打开mc-4.8.3/debian/rules
文件并取消注释此行--enable-vfs-smb=yes
。不要忘记在上述行末尾添加反斜杠字符:
override_dh_auto_configure:
dh_auto_configure -- AWK="awk" \
--libexecdir='$${prefix}/lib' \
--with-x \
--with-screen=slang \
--disable-rpath \
--disable-static \
--enable-vfs-undelfs \
--enable-tests \
--enable-vfs-smb=yes
从源代码构建二进制文件:
cd mc-4.8.3/
sudo dpkg-buildpackage
然后运行安装:
cd ..
sudo dpkg -i mc_4.8.3-9_i386.deb
验证您是否看到smbfs
以下Virtual File Systems
行:
$ mc -V
GNU Midnight Commander 4.8.3
Built with GLib 2.34.0
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ext2undelfs, ftpfs, fish, smbfs
Data types: char: 8; int: 32; long: 32; void *: 32; size_t: 32; off_t: 64;
来源:http://prolinux.org/content/midnight-commander-i-samba.php