安装支持 SMB 的 MC

Xso*_*oft 7 linux samba midnight-commander smb

如何安装支持 Samba 的 MC(Midnight Commander)(smb:// 链接,如 ftp)。我无法安装它你apt-get。我只有没有 smb 的 mc 版本。并且从源安装失败。我尝试谷歌它,但没有成功。

我在 Ubuntu 11 上(实际上是在 XBMC 11 上,但它就像 Ubuntu)。谢谢。

qua*_*nta 5

下载源代码并构建依赖项:

mkdir ~/.mc
cd !$
apt-get source mc
sudo apt-get build-dep mc
Run Code Online (Sandbox Code Playgroud)

打开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
Run Code Online (Sandbox Code Playgroud)

从源代码构建二进制文件:

cd mc-4.8.3/
sudo dpkg-buildpackage
Run Code Online (Sandbox Code Playgroud)

然后通过运行安装:

cd ..
sudo dpkg -i mc_4.8.3-9_i386.deb
Run Code Online (Sandbox Code Playgroud)

验证您是否看到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;
Run Code Online (Sandbox Code Playgroud)

来源:http : //prolinux.org/content/midnight-commander-i-samba.php