Centos7
在 CentOS 7 上安裝 Blowfish2 以在 VIM 中使用
我正在從基於 Debian 的發行版遷移到 CentOS 7。我有使用河豚加密的文件,我在 VIM 中使用以下設置透明地編輯這些文件
~/.vimrc
::set cryptmethod=blowfish2
這是我收到的錯誤:
E474:無效參數:cryptmethod=blowfish2
但是,我似乎在 CentOS 中找不到合適的軟體包。我已經安裝了以下軟體包,但仍然出現錯誤:
$ sudo yum install bcrypt cryptsetup-python libcryptui py-bcrypt
以下是所有似乎相關的軟體包:
$ yum search bcrypt Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirror.nonstop.co.il * epel: mirror.nonstop.co.il * extras: mirror.nonstop.co.il * updates: mirror.nonstop.co.il ============================= N/S matched: bcrypt ============================== libcryptui-devel.i686 : Header files required to develop with libcryptui libcryptui-devel.x86_64 : Header files required to develop with libcryptui rubygem-bcrypt.x86_64 : Wrapper around bcrypt() password hashing algorithm rubygem-bcrypt-doc.x86_64 : Documentation for rubygem-bcrypt bcrypt.x86_64 : File encryption utility cryptsetup-python.x86_64 : Python bindings for libcryptsetup libcryptui.i686 : Interface components for OpenPGP libcryptui.x86_64 : Interface components for OpenPGP py-bcrypt.x86_64 : Python bindings for OpenBSD's Blowfish password hashing code Name and summary matches only, use "search all" for everything. $ yum search blowfish Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirror.nonstop.co.il * epel: mirror.nonstop.co.il * extras: mirror.nonstop.co.il * updates: mirror.nonstop.co.il ============================ N/S matched: blowfish ============================= perl-Crypt-Eksblowfish.x86_64 : Eksblowfish block cipher php-horde-Horde-Crypt-Blowfish.noarch : Blowfish Encryption Library php-pear-Crypt-Blowfish.noarch : Quick two-way blowfish encryption php-phpseclib-crypt-blowfish.noarch : Pure-PHP implementation of Blowfish py-bcrypt.x86_64 : Python bindings for OpenBSD's Blowfish password hashing code Name and summary matches only, use "search all" for everything
CentOS 7 附帶 vim 7.4.160。但是, cryptmethod=blowfish2 需要vim 7.4.401 或更高版本。
無論如何,您可能應該使用全盤加密和更仔細審查的加密,例如 OpenPGP。cryptmethod=blowfish2 一開始就存在的原因是 cryptmethod=blowfish 被嚴重破壞了。而且它與任何東西都不兼容。
問題是 CentOS 7 附帶 VIM 7.4.160,正如Michael Hampton指出的我們需要 7.4.401。在評論中,我提到瞭如何安裝後來的 VIM,這裡是那些可能跟隨我腳步的人的完整說明。所有功勞歸功於 Michael 確定了問題,並歸功於此 Gist提出了正確的
configure
路線:git clone https://github.com/vim/vim.git cd vim/ ./configure --prefix=/usr --with-features=huge --enable-rubyinterp --enable-pythoninterp make sudo make install