use proper sed flags for osx, fix #1910
add extra warning when installing EPEL fails, do not install EPEL if libyaml is not needed, fix #1909