If I run gem install asciidoctor-mathematical, I get the following error:
Building native extensions. This could take a while...
ERROR: Error installing asciidoctor-mathematical:
ERROR: Failed to build gem native extension.
current directory: /home/ivma/.rvm/gems/ruby-3.0.1/gems/mathematical-1.6.14/ext/mathematical
/home/ivma/.rvm/rubies/ruby-3.0.1/bin/ruby -I /home/ivma/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0 -r ./siteconf20210526-38528-eex7lu.rb extconf.rb
checking for cmake... yes
checking for -lxml2... yes
checking for -lpangocairo-1.0... no
checking for libxml/tree.h in /include/libxml2,/usr/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... yes
checking for libxml/parser.h in /include/libxml2,/usr/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... yes
checking for libxml/xpath.h in /include/libxml2,/usr/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... yes
checking for libxml/xpathInternals.h in /include/libxml2,/usr/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... yes
-- The C compiler identification is GNU 10.3.0
-- The CXX compiler identification is GNU 10.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:19 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.
-- Found BISON: /usr/bin/bison (found version "3.7.5")
CMake Error at /usr/local/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find FLEX (missing: FLEX_EXECUTABLE)
Call Stack (most recent call first):
/usr/local/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake-3.20/Modules/FindFLEX.cmake:264 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:62 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/ivma/.rvm/gems/ruby-3.0.1/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeOutput.log".
/home/ivma/.rvm/gems/ruby-3.0.1/gems/make-0.3.1/bin/make:4:in <top (required)>': undefined local variable or methodmake' for main:Object (NameError)
from /home/ivma/.rvm/gems/ruby-3.0.1/bin/make:23:in load' from /home/ivma/.rvm/gems/ruby-3.0.1/bin/make:23:in'
extconf.rb failed
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/ivma/.rvm/rubies/ruby-3.0.1/bin/$(RUBY_BASE_NAME)
--with-xml2-dir
--without-xml2-dir
--with-xml2-include
--without-xml2-include=${xml2-dir}/include
--with-xml2-lib
--without-xml2-lib=${xml2-dir}/lib
--with-xml2lib
--without-xml2lib
--with-pangocairo-1.0-dir
--without-pangocairo-1.0-dir
--with-pangocairo-1.0-include
--without-pangocairo-1.0-include=${pangocairo-1.0-dir}/include
--with-pangocairo-1.0-lib
--without-pangocairo-1.0-lib=${pangocairo-1.0-dir}/lib
--with-pangocairo-1.0lib
--without-pangocairo-1.0lib
--use-system-mtex2MML
/home/ivma/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/fileutils.rb:494:in realpath': No such file or directory @ rb_check_realpath_internal - /home/ivma/.rvm/gems/ruby-3.0.1/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/build/libmtex2MML.a (Errno::ENOENT) from /home/ivma/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/fileutils.rb:494:incopy_entry'
from /home/ivma/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/fileutils.rb:471:in block in cp_r' from /home/ivma/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/fileutils.rb:1597:inblock in fu_each_src_dest'
from /home/ivma/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/fileutils.rb:1611:in fu_each_src_dest0' from /home/ivma/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/fileutils.rb:1595:infu_each_src_dest'
from /home/ivma/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/fileutils.rb:470:in cp_r' from extconf.rb:80:in'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
Gem files will remain installed in /home/ivma/.rvm/gems/ruby-3.0.1/gems/mathematical-1.6.14 for inspection.
Results logged to /home/ivma/.rvm/gems/ruby-3.0.1/extensions/x86_64-linux/3.0.0/mathematical-1.6.14/gem_make.out
And if I run sudo apt-get -qq -y install bison flex libffi-dev libxml2-dev libgdk-pixbuf2.0-dev libcairo2-dev libpango1.0-dev fonts-lyx cmake, I get the following error:
E: Unable to correct problems, you have held broken packages.
Hi,
I'm trying to install asciidoctor-mathematical but I get an error.
If I run
gem install asciidoctor-mathematical
, I get the following error:Building native extensions. This could take a while... ERROR: Error installing asciidoctor-mathematical: ERROR: Failed to build gem native extension.
/home/ivma/.rvm/rubies/ruby-3.0.1/bin/ruby -I /home/ivma/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0 -r ./siteconf20210526-38528-eex7lu.rb extconf.rb checking for cmake... yes checking for -lxml2... yes checking for -lpangocairo-1.0... no checking for libxml/tree.h in /include/libxml2,/usr/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... yes checking for libxml/parser.h in /include/libxml2,/usr/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... yes checking for libxml/xpath.h in /include/libxml2,/usr/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... yes checking for libxml/xpathInternals.h in /include/libxml2,/usr/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... yes -- The C compiler identification is GNU 10.3.0 -- The CXX compiler identification is GNU 10.3.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Deprecation Warning at CMakeLists.txt:19 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.
-- Found BISON: /usr/bin/bison (found version "3.7.5") CMake Error at /usr/local/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find FLEX (missing: FLEX_EXECUTABLE) Call Stack (most recent call first): /usr/local/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) /usr/local/share/cmake-3.20/Modules/FindFLEX.cmake:264 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:62 (find_package)
-- Configuring incomplete, errors occurred! See also "/home/ivma/.rvm/gems/ruby-3.0.1/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeOutput.log". /home/ivma/.rvm/gems/ruby-3.0.1/gems/make-0.3.1/bin/make:4:in'
extconf.rb failed
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
<top (required)>': undefined local variable or method
make' for main:Object (NameError) from /home/ivma/.rvm/gems/ruby-3.0.1/bin/make:23:inload' from /home/ivma/.rvm/gems/ruby-3.0.1/bin/make:23:in
Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/home/ivma/.rvm/rubies/ruby-3.0.1/bin/$(RUBY_BASE_NAME) --with-xml2-dir --without-xml2-dir --with-xml2-include --without-xml2-include=${xml2-dir}/include --with-xml2-lib --without-xml2-lib=${xml2-dir}/lib --with-xml2lib --without-xml2lib --with-pangocairo-1.0-dir --without-pangocairo-1.0-dir --with-pangocairo-1.0-include --without-pangocairo-1.0-include=${pangocairo-1.0-dir}/include --with-pangocairo-1.0-lib --without-pangocairo-1.0-lib=${pangocairo-1.0-dir}/lib --with-pangocairo-1.0lib --without-pangocairo-1.0lib --use-system-mtex2MML /home/ivma/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/fileutils.rb:494:in'
realpath': No such file or directory @ rb_check_realpath_internal - /home/ivma/.rvm/gems/ruby-3.0.1/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/build/libmtex2MML.a (Errno::ENOENT) from /home/ivma/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/fileutils.rb:494:in
copy_entry' from /home/ivma/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/fileutils.rb:471:inblock in cp_r' from /home/ivma/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/fileutils.rb:1597:in
block in fu_each_src_dest' from /home/ivma/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/fileutils.rb:1611:infu_each_src_dest0' from /home/ivma/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/fileutils.rb:1595:in
fu_each_src_dest' from /home/ivma/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/fileutils.rb:470:incp_r' from extconf.rb:80:in
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/ivma/.rvm/gems/ruby-3.0.1/extensions/x86_64-linux/3.0.0/mathematical-1.6.14/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/ivma/.rvm/gems/ruby-3.0.1/gems/mathematical-1.6.14 for inspection. Results logged to /home/ivma/.rvm/gems/ruby-3.0.1/extensions/x86_64-linux/3.0.0/mathematical-1.6.14/gem_make.out
And if I run
sudo apt-get -qq -y install bison flex libffi-dev libxml2-dev libgdk-pixbuf2.0-dev libcairo2-dev libpango1.0-dev fonts-lyx cmake
, I get the following error:E: Unable to correct problems, you have held broken packages.
I'm using the latest version of asciidoctor
Asciidoctor 2.0.12 [https://asciidoctor.org] Runtime Environment (ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux-gnu]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)
And the latest version of Ruby
ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-linux]
What am I doing wrong?
P.S. I don't know if this changes anything, but the Linux is installed as virtual OS on VirtualBox.