Brand new install of centos 9. (mostly minimal)
I did a find and there is no libl.so on my machine.
sudo yum install bison
Last metadata expiration check: 1:52:29 ago on Wed 23 Feb 2022 01:25:31 PM EST.
Package bison-3.7.4-5.el9.x86_64 is already installed.
sudo yum install flex
Last metadata expiration check: 1:52:25 ago on Wed 23 Feb 2022 01:25:31 PM EST.
Package flex-2.6.4-9.el9.x86_64 is already installed.
sudo yum install flex-devel
Last metadata expiration check: 1:52:35 ago on Wed 23 Feb 2022 01:25:31 PM EST.
No match for argument: flex-devel
I tried installing sudo yum groupinstall ‘Development Tools’
nothing works, any ideas?
2
Answers
As you pointed out in the question –
flex-devel
is not found.It’s in the
PowerTools
repo.The ‘official’ way to enable the repo is to use the yum config-manager command line:
This may give an error about being missing the
config-manager
command:If this happens, then you can install the dnf-plugins-core package:
and then enable the powertools repo, and then you should be able to
yum install flex-devel
, which provides:The static libraries (
libfl.a
andlibl.a
), which is what were provided before in the packageflex-devel
, have been moved to the packagelibfl-static
. I don’t know if RedHat ever provided shared objects; there’s a note in the libfl-static ChangeLog that seems to be saying that there is a new package calledlibfl2
with shared objects, but I don’t see it in the package repo. Anyway, static libraries should be fine. There’s hardly anything there.If you’re using
libl
, that means that:%option noyywrap
, which will remove the call toyywrap
(and if you’re using the version ofyywrap
inlibl
, then you don’t need it to call the function, since that version unconditionally returns 1), and/ormain
function.I strongly recommend including the following options in all flex files, unless you have a clear need for the suppressed features:
The
main
function inlibl
is also trivial. It can be replaced with: