使用以下步骤在 CentOS 6.9 上安装 systemd 版本 221 时:
# wget https://www.freedesktop.org/software/systemd/systemd-221.tar.xz
# tar -xJf systemd-221.tar.xz
# cd systemd-221
# ./configure
configure
失败,输出如下:
checking for sulogin... /sbin/sulogin
checking for mount... /bin/mount
checking for umount... /bin/umount
configure: error: *** ln doesn't support --relative ***
虽然我也安装了所有必需的 yum-devel。
# yum install gcc intltool gperf glib2-devel
# yum search xz-devel
问题是什么,我该如何解决?
checking for sulogin... /sbin/sulogin
checking for mount... /bin/mount
checking for umount... /bin/umount
configure: error: ln doesn't support --relative
CentOS 6 太旧了。其提供的Coreutils版本太旧。
看起来像Coreutils通过 commit e52293aa7fcf 修复了日期为 2014-03-13 的 ln --relative
.另见 ln.c
历史:
ln: --relative: fix updating of existing symlinks
Don't dereference an existing symlink being replaced. I.E. generate
the symlink relative to the symlink's containing dir, rather than to
some arbitrary place it points to.
- src/ln.c (convert_abs_rel): Don't consider the final component of the symlink name when canonicalizing, as we want to avoid
dereferencing the final component.
- tests/ln/relative.sh: Add a test case.
Red Hat 因提供过时的软件而声名狼藉。这就是为什么尽可能避免使用 Red Hat 软件的原因。 Fedora 还可以,因为它总是最新的。但是Red Hat和CentOS是坑...