我正在从基于 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
路线: