安装 udunits 库时遇到错误

安装 udunits 库时遇到错误

我正在尝试安装 ndunits 库。为此,我从ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-2.2.21.tar.gz 。我点击了以下链接https://publish.illinois.edu/mesomodel/2016/01/25/lecture-3-installing-ncview/编译时。该网站说我需要禁用 anaconda python。但是,我没有使用 anaconda,我有两个版本的 python。我不知道如何禁用它。然后我直接使用给定的命令

tar xvf expat-2.1.0.tar.gz
cd expat-2.1.0
./configure --prefix=$HOME/software
make install

但我在使用命令时收到以下错误make install

make install 
Making install in lib
make[1]: Entering directory '/home/mala/udunits-2.2.21/lib'
make  install-recursive
make[2]: Entering directory '/home/mala/udunits-2.2.21/lib'
Making install in xmlFailures
make[3]: Entering directory '/home/mala/udunits-2.2.21/lib/xmlFailures'
make[4]: Entering directory '/home/mala/udunits-2.2.21/lib/xmlFailures'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/home/mala/udunits-2.2.21/lib/xmlFailures'
make[3]: Leaving directory '/home/mala/udunits-2.2.21/lib/xmlFailures'
Making install in xmlSuccesses
make[3]: Entering directory '/home/mala/udunits-2.2.21/lib/xmlSuccesses'
make[4]: Entering directory '/home/mala/udunits-2.2.21/lib/xmlSuccesses'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/home/mala/udunits-2.2.21/lib/xmlSuccesses'
make[3]: Leaving directory '/home/mala/udunits-2.2.21/lib/xmlSuccesses'
make[3]: Entering directory '/home/mala/udunits-2.2.21/lib'
depbase=`echo unitcore.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include  -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT unitcore.lo -MD -MP -MF $depbase.Tpo -c -o unitcore.lo unitcore.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT unitcore.lo -MD -MP -MF .deps/unitcore.Tpo -c unitcore.c  -fPIC -DPIC -o .libs/unitcore.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT unitcore.lo -MD -MP -MF .deps/unitcore.Tpo -c unitcore.c -o unitcore.o >/dev/null 2>&1
depbase=`echo converter.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include  -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT converter.lo -MD -MP -MF $depbase.Tpo -c -o converter.lo converter.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT converter.lo -MD -MP -MF .deps/converter.Tpo -c converter.c  -fPIC -DPIC -o .libs/converter.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT converter.lo -MD -MP -MF .deps/converter.Tpo -c converter.c -o converter.o >/dev/null 2>&1
depbase=`echo formatter.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include  -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT formatter.lo -MD -MP -MF $depbase.Tpo -c -o formatter.lo formatter.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT formatter.lo -MD -MP -MF .deps/formatter.Tpo -c formatter.c  -fPIC -DPIC -o .libs/formatter.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT formatter.lo -MD -MP -MF .deps/formatter.Tpo -c formatter.c -o formatter.o >/dev/null 2>&1
depbase=`echo idToUnitMap.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include  -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT idToUnitMap.lo -MD -MP -MF $depbase.Tpo -c -o idToUnitMap.lo idToUnitMap.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT idToUnitMap.lo -MD -MP -MF .deps/idToUnitMap.Tpo -c idToUnitMap.c  -fPIC -DPIC -o .libs/idToUnitMap.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT idToUnitMap.lo -MD -MP -MF .deps/idToUnitMap.Tpo -c idToUnitMap.c -o idToUnitMap.o >/dev/null 2>&1
depbase=`echo unitToIdMap.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include  -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT unitToIdMap.lo -MD -MP -MF $depbase.Tpo -c -o unitToIdMap.lo unitToIdMap.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT unitToIdMap.lo -MD -MP -MF .deps/unitToIdMap.Tpo -c unitToIdMap.c  -fPIC -DPIC -o .libs/unitToIdMap.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT unitToIdMap.lo -MD -MP -MF .deps/unitToIdMap.Tpo -c unitToIdMap.c -o unitToIdMap.o >/dev/null 2>&1
depbase=`echo unitAndId.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include  -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT unitAndId.lo -MD -MP -MF $depbase.Tpo -c -o unitAndId.lo unitAndId.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT unitAndId.lo -MD -MP -MF .deps/unitAndId.Tpo -c unitAndId.c  -fPIC -DPIC -o .libs/unitAndId.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT unitAndId.lo -MD -MP -MF .deps/unitAndId.Tpo -c unitAndId.c -o unitAndId.o >/dev/null 2>&1
depbase=`echo systemMap.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include  -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT systemMap.lo -MD -MP -MF $depbase.Tpo -c -o systemMap.lo systemMap.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT systemMap.lo -MD -MP -MF .deps/systemMap.Tpo -c systemMap.c  -fPIC -DPIC -o .libs/systemMap.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT systemMap.lo -MD -MP -MF .deps/systemMap.Tpo -c systemMap.c -o systemMap.o >/dev/null 2>&1
depbase=`echo prefix.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include  -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT prefix.lo -MD -MP -MF $depbase.Tpo -c -o prefix.lo prefix.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT prefix.lo -MD -MP -MF .deps/prefix.Tpo -c prefix.c  -fPIC -DPIC -o .libs/prefix.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT prefix.lo -MD -MP -MF .deps/prefix.Tpo -c prefix.c -o prefix.o >/dev/null 2>&1
depbase=`echo parser.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include  -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT parser.lo -MD -MP -MF $depbase.Tpo -c -o parser.lo parser.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/media/mala/temporary/Project_practical/Build_WRF/LIBRARIES/grib2/include -L/home/mala/software/lib -lexpat -I/home/mala/software/include -MT parser.lo -MD -MP -MF .deps/parser.Tpo -c parser.c  -fPIC -DPIC -o .libs/parser.o
parser.c: In function 'utparse':
parser.c:63:17: warning: implicit declaration of function 'utlex' [-Wimplicit-function-declaration]
 #define yylex   utlex
                 ^
parser.c:862:16: note: in expansion of macro 'yylex'
 #ifdef YYLEX_PARAM
                ^~~  
parser.c:1506:16: note: in expansion of macro 'YYLEX'
   if (yychar == YYEMPTY)
                ^~~~~
parser.y:366:8: warning: implicit declaration of function 'utGetPrefixByName' [-Wimplicit-function-declaration]

        ^                
parser.y:373:9: warning: implicit declaration of function 'utGetPrefixBySymbol' [-Wimplicit-function-declaration]
        if (!symbolPrefixSeen &&
         ^~~~~~~~~~~~~~~~~~~
parser.y: In function 'ut_parse':
parser.y:639:13: error: unknown type name 'YY_BUFFER_STATE'
         if (utf8String != NULL) {
             ^~~~~~~~~~~~~~~
parser.y:639:35: warning: implicit declaration of function 'ut_scan_string' [-Wimplicit-function-declaration]
         if (utf8String != NULL) {
                                   ^             
parser.y:647:13: error: 'ut_flex_debug' undeclared (first use in this function)
             utdebug = 0;
             ^~~~~~~~~~~~ 
parser.y:647:13: note: each undeclared identifier is reported only once for each function it appears in
parser.y:654:25: error: 'yy_c_buf_p' undeclared (first use in this function)
                 int     status;
                         ^~~~~~~   
parser.y:654:42: error: invalid type argument of '->' (have 'int')
                 int     status;
                                          ^ 
parser.y:671:13: warning: implicit declaration of function 'ut_delete_buffer' [-Wimplicit-function-declaration]

             ^               
Makefile:815: recipe for target 'parser.lo' failed
make[3]: *** [parser.lo] Error 1
make[3]: Leaving directory '/home/mala/udunits-2.2.21/lib'
Makefile:1025: recipe for target 'install-recursive' failed
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory '/home/mala/udunits-2.2.21/lib'
Makefile:1357: recipe for target 'install' failed
make[1]: *** [install] Error 2
make[1]: Leaving directory '/home/mala/udunits-2.2.21/lib'
Makefile:681: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

造成此错误的原因可能是什么?

相关内容