dvipng 패키지를 설치했습니다. libkpathsea를 설치했는데도 찾을 수 없는 문제가 있어서, 다음 안내에 따라 시도해 보았습니다(http://www.nongnu.org/dvipng/dvipng_2.html#Build_002finstall):
일부 컴퓨터에서는 링커 검색 경로에 없는 디렉터리에 라이브러리가 설치됩니다. "./configure"를 실행할 때 libgd 또는 libkpathsea를 찾을 수 없음을 나타내는 오류가 생성됩니다(대부분). 그런 다음 해당 라이브러리에 대한 개체 파일의 경로를 지정해야 합니다. 일반적으로 "libgd.a" 또는 "libgd.so"라고 합니다. 예를 들어 "/usr/local/lib"에 있으면 다음을 수행하십시오.
./configure LDFLAGS=-L/usr/local/lib
라이브러리가 공유 객체 파일(".so")로 사용 가능한 경우 런타임 링커에게 라이브러리를 찾을 수 있는 위치를 알려준 다음 다음을 사용해야 할 수도 있습니다.
./configure LDFLAGS='-L/usr/local/lib -R/usr/local/lib'
이것이 바로 제 상황입니다. 저는 Latex 라이브러리를 설치했고 lib 폴더에 "libgd.a" 또는 "libgd.so"를 가지고 있습니다. 그러나 그가 언급한 코드를 실행하려고 하면 다음과 같이 보고됩니다.
checking for C compiler default output file name... configure: error: C compiler cannot create executables
내 config.log는 다음과 같습니다.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by dvipng configure 1.9, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ ./configure LDFLAGS=-L/usr/local/lib -R/usr/local/lib
## --------- ##
## Platform. ##
## --------- ##
hostname = dingshan-virtual-machine
uname -m = x86_64
uname -r = 5.4.0-29-generic
uname -s = Linux
uname -v = #33-Ubuntu SMP Wed Apr 29 14:32:27 UTC 2020
/usr/bin/uname -p = x86_64
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/local/texlive/2018/bin/x86_64-linux
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /usr/local/games
PATH: /snap/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1739: checking whether make sets $(MAKE)
configure:1760: result: yes
configure:1817: checking for gcc
configure:1833: found /usr/bin/gcc
configure:1844: result: gcc
configure:2082: checking for C compiler version
configure:2089: gcc --version >&5
gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2092: $? = 0
configure:2099: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-10ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)
configure:2102: $? = 0
configure:2109: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2112: $? = 1
configure:2135: checking for C compiler default output file name
configure:2162: gcc -L/usr/local/lib -R/usr/local/lib conftest.c >&5
gcc: error: unrecognized command line option '-R'
configure:2165: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "dvipng"
| #define PACKAGE_TARNAME "dvipng"
| #define PACKAGE_VERSION "1.9"
| #define PACKAGE_STRING "dvipng 1.9"
| #define PACKAGE_BUGREPORT "[email protected]"
| #define DEBUG 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2204: error: C compiler cannot create executables
See `config.log' for more details.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-L/usr/local/lib -R/usr/local/lib'
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
ALLOCA=''
CC='gcc'
CFLAGS=''
CPP=''
CPPFLAGS=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
FT2_CFLAGS=''
FT2_CONFIG=''
FT2_LIBS=''
GREP=''
GS=''
INSTALL_BIN_TARGET=''
INSTALL_DATA=''
INSTALL_INFO=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
KPSEWHICH=''
LDFLAGS='-L/usr/local/lib -R/usr/local/lib'
LIBOBJS=''
LIBS=''
LN_S=''
LTLIBOBJS=''
MAKEINFO=''
MAKEINFO_MACROS=''
OBJEXT=''
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_NAME='dvipng'
PACKAGE_STRING='dvipng 1.9'
PACKAGE_TARNAME='dvipng'
PACKAGE_VERSION='1.9'
PATH_SEPARATOR=':'
POW_LIB=''
PSFONTS_O=''
SET_MAKE=''
SHELL='/bin/bash'
ac_ct_CC='gcc'
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE_NAME "dvipng"
#define PACKAGE_TARNAME "dvipng"
#define PACKAGE_VERSION "1.9"
#define PACKAGE_STRING "dvipng 1.9"
#define PACKAGE_BUGREPORT "[email protected]"
#define DEBUG 1
configure: exit 77
누구든지 나를 도와줄 수 있나요?
답변1
이 -R
부분을 무시하십시오. GCC에는 이 옵션이 없으며, ./configure
이를 알려줄 필요도 없습니다 /usr/local/lib
.
./configure
작동해야합니다.