在configure过程还可能出现一个问题:
checking for LIBXML2... configure: error: Package requirements (libxml-2.0 >= 2.6) were not met:
No package 'libxml-2.0' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.Alternatively, you may set the environment variables LIBXML2_CFLAGS
and LIBXML2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.应该是XML库指定路径错误,重新指定:
./configure --prefix=ParseError: KaTeX parse error: Undefined control sequence: \ at position 38: …ips-linux-gnu \̲ ̲LIBXML2_LIBS='-…{xml_install_dir}/lib -lxml2' LIBXML2_CFLAGS='-I${xml_install_dir}/include/libxml2'还是不行,debug了很久,最后发现打开configure文件发现:
if test -n "libxml2_LIBS"难道要小写?
./configure --prefix=ParseError: KaTeX parse error: Undefined control sequence: \ at position 38: …ips-linux-gnu \̲ ̲libxml2_LIBS='-…{xml_install_dir}/lib -lxml2' libxml2_CFLAGS='-I${xml_install_dir}/include/libxml2'改成小写果然可以了,真是防不胜防啊