我对 Ubuntu 还比较陌生。我在 Windows 10 PC 上为生物信息学应用程序设置了一个 Ubuntu 18.04 子系统。
在多个应用程序安装过程中,运行 ./configure 和 make 后出现以下错误:
bgzf.h:33:10: fatal error: zlib.h: No such file or directory
#include <zlib.h>
configure 命令返回:
checking for ZLIB... yes
Whereis 返回:
zlib: /usr/local/bin/zlib.h /usr/include/zlib.h /usr/share/man/man3/zlib.3.gz
echo | gcc -E -v - 返回:
Reading specs from /home/USER/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/specs
COLLECT_GCC=gcc
Target: x86_64-conda_cos6-linux-gnu
Configured with: /home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/.build/x86_64-conda_cos6-linux-gnu/src/gcc/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=x86_64-conda_cos6-linux-gnu --prefix=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/gcc_built --with-sysroot=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/gcc_built/x86_64-conda_cos6-linux-gnu/sysroot --enable-languages=c,c++,fortran,objc,obj-c++ --with-pkgversion='crosstool-NG 1.23.0.449-a04d0' --enable-__cxa_atexit --disable-libmudflap --enable-libgomp --disable-libssp --enable-libquadmath --enable-libquadmath-support --enable-libsanitizer --enable-libmpx --with-gmp=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/.build/x86_64-conda_cos6-linux-gnu/buildtools --with-mpfr=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/.build/x86_64-conda_cos6-linux-gnu/buildtools --with-mpc=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/.build/x86_64-conda_cos6-linux-gnu/buildtools --with-isl=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/.build/x86_64-conda_cos6-linux-gnu/buildtools --enable-lto --enable-threads=posix --enable-target-optspace --enable-plugin --enable-gold --disable-nls --disable-multilib --with-local-prefix=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/gcc_built/x86_64-conda_cos6-linux-gnu/sysroot --enable-long-long --enable-default-pie
Thread model: posix
gcc version 7.3.0 (crosstool-NG 1.23.0.449-a04d0)
COLLECT_GCC_OPTIONS='-E' '-v' '-mtune=generic' '-march=x86-64'
/home/USER/anaconda3/bin/../libexec/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/cc1 -E -quiet -v -iprefix /home/USER/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/ -isysroot /home/USER/anaconda3/bin/../x86_64-conda_cos6-linux-gnu/sysroot - -mtune=generic -march=x86-64
ignoring duplicate directory "/home/USER/anaconda3/bin/../lib/gcc/../../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/include"
ignoring nonexistent directory "/home/USER/anaconda3/bin/../x86_64-conda_cos6-linux-gnu/sysroot/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/gcc_built/x86_64-conda_cos6-linux-gnu/sysroot/include"
ignoring duplicate directory "/home/USER/anaconda3/bin/../lib/gcc/../../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/include-fixed"
ignoring duplicate directory "/home/USER/anaconda3/bin/../lib/gcc/../../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/home/USER/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/include
/home/USER/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/include-fixed
/home/USER/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/include
/home/USER/anaconda3/bin/../x86_64-conda_cos6-linux-gnu/sysroot/usr/include
End of search list.
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "<stdin>"
COMPILER_PATH=/home/USER/anaconda3/bin/../libexec/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/:/home/USER/anaconda3/bin/../libexec/gcc/:/home/USER/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/
LIBRARY_PATH=/home/USER/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/:/home/USER/anaconda3/bin/../lib/gcc/:/home/USER/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/lib/../lib/:/home/USER/anaconda3/bin/../x86_64-conda_cos6-linux-gnu/sysroot/lib/../lib/:/home/USER/anaconda3/bin/../x86_64-conda_cos6-linux-gnu/sysroot/usr/lib/../lib/:/home/USER/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/lib/:/home/USER/anaconda3/bin/../x86_64-conda_cos6-linux-gnu/sysroot/lib/:/home/USER/anaconda3/bin/../x86_64-conda_cos6-linux-gnu/sysroot/usr/lib/
COLLECT_GCC_OPTIONS='-E' '-v' '-mtune=generic' '-march=x86-64'
其他帖子 建议安装 zlib-dev,已经有最新的 zlib1g-dev 版本(1:1.2.11.dfsg-0ubuntu2)。
您能否建议解决此错误的最佳方法?非常感谢。
echo 的输出 | gcc -E -v -
Reading specs from /home/USER/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-
linux-gnu/7.3.0/specs
COLLECT_GCC=gcc
Target: x86_64-conda_cos6-linux-gnu
Configured with: /home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/.build/x86_64-conda_cos6-linux-gnu/src/gcc/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=x86_64-conda_cos6-linux-gnu --prefix=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/gcc_built --with-sysroot=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/gcc_built/x86_64-conda_cos6-linux-gnu/sysroot --enable-languages=c,c++,fortran,objc,obj-c++ --with-pkgversion='crosstool-NG 1.23.0.449-a04d0' --enable-__cxa_atexit --disable-libmudflap --enable-libgomp --disable-libssp --enable-libquadmath --enable-libquadmath-support --enable-libsanitizer --enable-libmpx --with-gmp=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/.build/x86_64-conda_cos6-linux-gnu/buildtools --with-mpfr=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/.build/x86_64-conda_cos6-linux-gnu/buildtools --with-mpc=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/.build/x86_64-conda_cos6-linux-gnu/buildtools --with-isl=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/.build/x86_64-conda_cos6-linux-gnu/buildtools --enable-lto --enable-threads=posix --enable-target-optspace --enable-plugin --enable-gold --disable-nls --disable-multilib --with-local-prefix=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/gcc_built/x86_64-conda_cos6-linux-gnu/sysroot --enable-long-long --enable-default-pie
Thread model: posix
gcc version 7.3.0 (crosstool-NG 1.23.0.449-a04d0)
COLLECT_GCC_OPTIONS='-E' '-v' '-mtune=generic' '-march=x86-64'
/home/USER/anaconda3/bin/../libexec/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/cc1 -E -quiet -v -iprefix /home/USER/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/ -isysroot /home/USER/anaconda3/bin/../x86_64-conda_cos6-linux-gnu/sysroot - -mtune=generic -march=x86-64
ignoring duplicate directory "/home/USER/anaconda3/bin/../lib/gcc/../../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/include"
ignoring nonexistent directory "/home/USER/anaconda3/bin/../x86_64-conda_cos6-linux-gnu/sysroot/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/gcc_built/x86_64-conda_cos6-linux-gnu/sysroot/include"
ignoring duplicate directory "/home/USER/anaconda3/bin/../lib/gcc/../../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/include-fixed"
ignoring duplicate directory "/home/USER/anaconda3/bin/../lib/gcc/../../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/home/USER/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/include
/home/USER/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/include-fixed
/home/USER/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/include
/home/USER/anaconda3/bin/../x86_64-conda_cos6-linux-gnu/sysroot/usr/include
End of search list.
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "<stdin>"
COMPILER_PATH=/home/USER/anaconda3/bin/../libexec/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/:/home/USER/anaconda3/bin/../libexec/gcc/:/home/USER/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/
LIBRARY_PATH=/home/USER/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/:/home/USER/anaconda3/bin/../lib/gcc/:/home/USER/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/lib/../lib/:/home/USER/anaconda3/bin/../x86_64-conda_cos6-linux-gnu/sysroot/lib/../lib/:/home/USER/anaconda3/bin/../x86_64-conda_cos6-linux-gnu/sysroot/usr/lib/../lib/:/home/USER/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/lib/:/home/USER/anaconda3/bin/../x86_64-conda_cos6-linux-gnu/sysroot/lib/:/home/USER/anaconda3/bin/../x86_64-conda_cos6-linux-gnu/sysroot/usr/lib/
COLLECT_GCC_OPTIONS='-E' '-v' '-mtune=generic' '-march=x86-64'