gpt4 book ai didi

ubuntu - 无法在 ubuntu 上从源代码安装 GDAL

转载 作者:行者123 更新时间:2023-12-04 18:59:00 25 4
gpt4 key购买 nike

sudo apt-get install build-essential python-all-dev
wget http://download.osgeo.org/gdal/3.4.0/gdal-3.4.0.tar.gz
tar xvfz gdal-3.4.0.tar.gz
cd gdal-3.4.0
./configure --with-python
make
sudo make install
当我运行上面的代码在 ubuntu 上安装 gdal 3.4.0 时。运行 make 时出现以下错误和 sudo make install .有人知道为什么我不能用 python 3.9 在 Ubuntu 21.10 上安装 GDAL 3.4.0
./config.status --recheck
make: ./config.status: No such file or directory
GNUmakefile:1: GDALmake.opt: No such file or directory
make: *** [GNUmakefile:170: config.status] Error 127

这是 ./configure --with-python 的输出
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for C compiler vendor... gnu
checking C_WFLAGS for most reasonable warnings... -Wall
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for C++ compiler vendor... gnu
checking CXX_WFLAGS for most reasonable warnings... -Wall
checking whether C compiler accepts -Werror -we10006... no
checking whether C compiler accepts -diag-disable 188,1684,2259,2304,3280,11074,11076... no
checking whether C compiler accepts -Wextra... yes
checking whether C compiler accepts -Winit-self... yes
checking whether C compiler accepts -Wunused-parameter... yes
checking whether C compiler accepts -Wmissing-prototypes... yes
checking whether C compiler accepts -Wmissing-declarations... yes
checking whether C compiler accepts -Wformat... yes
checking whether C compiler accepts -Wformat -Werror=format-security -Wno-format-nonliteral... yes
checking whether C compiler accepts -Wshorten-64-to-32... no
checking whether C compiler accepts -Wlogical-op... yes
checking whether C compiler accepts -Wshadow... yes
checking whether C compiler accepts -Wmissing-include-dirs... yes
checking whether C compiler accepts -Werror=vla... yes
checking whether C compiler accepts -Wdate-time... yes
checking whether C compiler accepts -Wnull-dereference... yes
checking whether C compiler accepts -Wduplicated-cond... yes
checking whether C++ compiler accepts -Wextra-semi... yes
checking whether C compiler accepts -Wno-sign-compare... yes
checking whether C compiler accepts -Wcomma... no
checking whether C compiler accepts -Wfloat-conversion... yes
checking whether C compiler accepts -Wdocumentation -Wno-documentation-deprecated-sync... no
checking whether C++ compiler accepts -Wunused-private-field... no
checking whether C++ compiler accepts -Wmissing-declarations... yes
checking whether C++ compiler accepts -Wnon-virtual-dtor... yes
checking whether C++ compiler accepts -Wold-style-cast... yes
checking whether C++ compiler accepts -Weffc++... yes
checking if -Weffc++ should be enabled... yes
checking whether C++ compiler accepts -Woverloaded-virtual... yes
checking whether C++ compiler accepts -fno-operator-names... yes
checking whether C++ compiler accepts -Wzero-as-null-pointer-constant... yes
checking if use C++14 compiler options... disabled by user
checking whether g++ supports C++11 features by default... yes
checking whether C++ compiler accepts -Wsuggest-override... yes
checking if -Wimplicit-fallthrough can be enabled... yes
checking for gcc option to accept ISO C99... none needed
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... no
checking for mawk... mawk
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for std::isnan... yes
checking for dlopen in -ldl... yes
checking for nanosleep in -lrt... yes
checking for sin in -lm... yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking dbmalloc.h usability... no
checking dbmalloc.h presence... no
checking for dbmalloc.h... no
checking for dlfcn.h... (cached) yes
checking for stdint.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking values.h usability... yes
checking values.h presence... yes
checking for values.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking direct.h usability... no
checking direct.h presence... no
checking for direct.h... no
checking linux/userfaultfd.h usability... yes
checking linux/userfaultfd.h presence... yes
checking for linux/userfaultfd.h... yes
checking linux/fs.h usability... yes
checking linux/fs.h presence... yes
checking for linux/fs.h... yes
checking whether byte ordering is bigendian... no
checking for long long... yes
checking for 64bit file io... yes
checking for stat64... yes
checking for fopen64... yes
checking for ftruncate64... yes
checking size of int... 4
checking size of unsigned long... 8
checking size of void*... 8
checking for int8... no
checking for int16... no
checking for int32... no
checking for uintptr_t... yes
checking for vprintf... yes
checking for _doprnt... no
checking for snprintf... yes
checking for vsnprintf... yes
checking for atoll... yes
checking for strtoll... yes
checking for strtoull... yes
checking for strtof... yes
checking for getcwd... yes
checking whether strtof is declared... yes
checking for readlink... yes
checking for lstat... yes
checking for posix_spawnp... yes
checking for posix_memalign... yes
checking for vfork... yes
checking for mmap... yes
checking for sigaction... yes
checking for statvfs... yes
checking for statvfs64... yes
checking for getrlimit... yes
checking for RLIMIT_AS... yes
checking for gmtime_r... yes
checking for localtime_r... yes
checking for uselocale... yes
checking to enable debug build... no, CFLAGS="-g -O2"
checking whether GCC 4.1 atomic builtins are available... yes
checking whether GCC bswap builtins are available... yes
checking for __uint128_t... yes
checking whether SSE is available at compile time... yes
checking whether SSSE3 is available at compile time... yes
checking whether AVX is available at compile time... yes
checking to enable LTO (link time optimization) build... no
checking whether we should hide internal symbols... no
checking for local include/lib path... none
checking for pthread_create in -lpthread... yes
checking for PTHREAD_MUTEX_RECURSIVE... yes
checking for PTHREAD_MUTEX_ADAPTIVE_NP... yes
checking for pthread_spinlock_t... yes
checking for 5 args mremap()... yes
checking for _SC_PHYS_PAGES... yes
checking for deflateInit_ in -lz... no
using internal libz code as deflateInit_ is missing
using internal libz code.
checking for libdeflate_zlib_decompress in -ldeflate... no
checking libdeflate.h usability... no
checking libdeflate.h presence... no
checking for libdeflate.h... no
checking for ld used by GCC... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking for shared library run path origin... done
checking for iconv... yes
checking for working iconv... yes
checking for iconv declaration...
extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
using ICONV_CPP_CONST=""
configure: Bash completions not requested
checking for jpeg_read_scanlines in -ljpeg... no
checking jpeglib.h usability... no
checking jpeglib.h presence... no
checking for jpeglib.h... no
using internal jpeg code.
checking for libtiff... checking for TIFFScanlineSize64 in -ltiff... no
using internal TIFF code.
checking for curl-config... no
checking for SQLite3 library >= 3.0.0... disabled
checking for PROJ >= 6 library... checking for proj_create_from_wkt in -lproj... no
checking for internal_proj_create_from_wkt in -lproj... no
checking for internal_proj_create_from_wkt in -linternalproj... no
configure: error: PROJ 6 symbols not found

最佳答案

Ubuntu 21.10 , gdal-3.4.0

configure: error: PROJ 6 symbols not found

sudo apt install libproj-dev
... 提供版本 7 和 ./configure回复
PROJ >= 6:     yes
默认的“gdal 构建先决条件”→参见“与 gdal 相关的其他软件包” https://packages.ubuntu.com/source/impish/gdal ...您可以使用 sudo apt-get build-dep gdal 进行安装→
→ 编辑三个“注释行”: sudo gedit /etc/apt/sources.list → 来自 # deb-src URL ...deb-src URL ... ,主要,-更新主要,宇宙
我的例子
deb-src http://dk.archive.ubuntu.com/ubuntu/ impish main
deb-src http://dk.archive.ubuntu.com/ubuntu/ impish-updates main
deb-src http://dk.archive.ubuntu.com/ubuntu/ impish universe
然后: sudo apt update ...并且可以运行“build-dep”命令。

关于ubuntu - 无法在 ubuntu 上从源代码安装 GDAL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70065842/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com