在macOS Catalina 10.15.1下安装DBD::mysql时遇到问题
无法在macOS Catalina 10.15.1下安装DBD::mysql。Mysql 8.0.18和openssl 1.0.2t通过brew安装 以下是模块安装日志:在macOS Catalina 10.15.1下安装DBD::mysql时遇到问题,mysql,macos,perl,dbi,dbd,Mysql,Macos,Perl,Dbi,Dbd,无法在macOS Catalina 10.15.1下安装DBD::mysql。Mysql 8.0.18和openssl 1.0.2t通过brew安装 以下是模块安装日志: cpan[1]> install DBD::mysql .......... I will use the following settings for compiling and testing: cflags (mysql_config) = -I/usr/local/Cellar/mysql/
cpan[1]> install DBD::mysql
..........
I will use the following settings for compiling and testing:
cflags (mysql_config) = -I/usr/local/Cellar/mysql/8.0.18_1/include/mysql
embedded (guessed ) =
ldflags (guessed ) =
libs (mysql_config) = -L/usr/local/Cellar/mysql/8.0.18_1/lib -L/usr/local/opt/openssl/lib -lmysqlclient -lssl -lcrypto
mysql_config (guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
nossl (default ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testport (default ) =
testsocket (default ) =
testuser (guessed ) = dmitry
To change these settings, see 'perl Makefile.PL --help' and
'perldoc DBD::mysql::INSTALL'.
Checking if libs are available for compiling...
Looks good.
Checking if your kit is complete...
Looks good
Using DBI 1.631 (for perl 5.018004 on darwin-thread-multi-2level) installed in /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/auto/DBI/
Writing Makefile for DBD::mysql
Wide character in print at /System/Library/Perl/5.18/ExtUtils/MakeMaker.pm line 1034.
Wide character in print at /System/Library/Perl/5.18/ExtUtils/MakeMaker.pm line 1034.
Writing MYMETA.yml and MYMETA.json
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cc -c -I/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/auto/DBI -I/usr/local/Cellar/mysql/8.0.18_1/include/mysql -DDBD_MYSQL_WITH_SSL -g -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -Os -DVERSION=\"4.050\" -DXS_VERSION=\"4.050\" -iwithsysroot "/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE" dbdimp.c
In file included from dbdimp.c:15:
./dbdimp.h:20:10: fatal error: 'DBIXS.h' file not found
#include <DBIXS.h> /* installed by the DBI module */
^~~~~~~~~
1 error generated.
make: *** [dbdimp.o] Error 1
DVEEDEN/DBD-mysql-4.050.tar.gz
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
DVEEDEN/DBD-mysql-4.050.tar.gz : make NO
cpan[2]>
如何在编译期间包含此头文件
更新
我的搜索使我使用没有头文件的标准路径构建包
/System/Library/Perl/5.18/darwin-thread-multi-2level
您必须使用路径
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level
但这里是如何指定它的?我在安装Mac::SystemDirectory时遇到了同样的问题
/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/EXTERN.h-
找不到文件
Perl信息:
perl -V
Summary of my perl5 (revision 5 version 18 subversion 4) configuration:
Platform:
osname=darwin, osvers=19.0, archname=darwin-thread-multi-2level
uname='darwin osx391.sd.apple.com 19.0 darwin kernel version 18.0.0: tue jul 9 11:12:08 pdt 2019; root:xnu-4903.201.2.100.7~1release_x86_64 x86_64 '
config_args='-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags= -Dman3ext=3pm -Duseithreads -Duseshrplib -Dinc_version_list=none -Dcc=cc'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags =' -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector',
optimize='-Os',
cppflags='-g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector'
ccversion='', gccversion='4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.32.4) (-macos10.15-objc-selector-opts)', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector'
libpth=/usr/lib /usr/local/lib
libs=
perllibs=
libc=, so=dylib, useshrplib=true, libperl=libperl.dylib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_64_BIT_ALL
USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
USE_REENTRANT_API
Locally applied patches:
/Library/Perl/Updates/<version> comes before system perl directories
installprivlib and installarchlib points to the Updates directory
Built under darwin
Compiled at Aug 23 2019 16:44:31
@INC:
/Library/Perl/5.18/darwin-thread-multi-2level
/Library/Perl/5.18
/Network/Library/Perl/5.18/darwin-thread-multi-2level
/Network/Library/Perl/5.18
/Library/Perl/Updates/5.18.4/darwin-thread-multi-2level
/Library/Perl/Updates/5.18.4
/System/Library/Perl/5.18/darwin-thread-multi-2level
/System/Library/Perl/5.18
/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.18
.
perl-V
我的perl5(修订版5版本18 subversion 4)配置摘要:
站台:
osname=darwin,osvers=19.0,archname=darwin-thread-multi-2level
uname='darwin osx391.sd.apple.com 19.0达尔文内核版本18.0.0:tue jul 9 11:12:08 pdt 2019;根目录:xnu-4903.201.2.100.7~1release_x86_64 x86_64'
config_args='-ds-e-Dprefix=/usr-Dccflags=-g-pipe-Dldflags=-Dman3ext=3pm-duseireads-Duseshrplib-Dinc_version_list=none-Dcc=cc'
提示=推荐,使用POSIX=真,d_sigaction=定义
useithreads=define,useithmultiplicity=define
useperlio=define,d_sfio=undef,uselagefiles=define,usesocks=undef
use64bitint=define,use64bitall=define,uselongdouble=undef
usemymalloc=n,bincompat5005=undef
编译器:
cc='cc',ccflags='-g-pipe-fno common-DPERL_DARWIN-fno严格别名-fstack protector',
优化='-Os',
cppflags='-g-pipe-fno common-DPERL_DARWIN-fno严格别名-fstack protector'
ccversion='',GCCVVersion=''4.2.1兼容苹果LLVM 11.0.0(clang-1100.0.32.4)(-macos10.15-objc-selector-opts),gccosandvers=''
intsize=4,longsize=8,ptrsize=8,doublesize=8,byteorder=12345678
d_longlong=define,longlongsize=8,d_longdbl=define,longdblsize=16
ivtype='long',ivsize=8,nvtype='double',nvsize=8,Off\u t='Off\u t',lseeksize=8
alignbytes=8,prototype=define
链接器和库:
ld='cc',ldflags='-fstack-protector'
libpth=/usr/lib/usr/local/lib
libs=
珍珠=
libc=,so=dylib,useshrplib=true,libperl=libperl.dylib
gnulibc_版本=“”
动态链接:
dlsrc=dl_dlopen.xs,dlext=bundle,d_dlsymun=unde,ccdlflags=''
cccdlflags='',lddlflags='-bundle-未定义的动态查找-fstack保护器'
此二进制文件的特征(来自libperl):
编译时选项:具有\u倍的多重性PERLIO\u层
PERL\u不创建\u GVSV
PERL\u HASH\u FUNC\u一次一个\u
PERL\u隐式\u上下文PERL\u MALLOC\u WRAP
PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_64_BIT_ALL
使用64位文件使用ITHEREAD使用大文件
使用区域设置使用区域设置整理使用区域设置类型
使用语言环境使用数字使用PERLIO使用PERL
使用可重入API
本地应用的修补程序:
/Library/Perl/Updates/位于系统Perl目录之前
installprivlib和installarchlib指向更新目录
建立在达尔文的统治之下
编译时间:2019年8月23日16:44:31
@公司:
/Library/Perl/5.18/darwin-thread-multi-2level
/Library/Perl/5.18
/Network/Library/Perl/5.18/darwin-thread-multi-2level
/网络/库/Perl/5.18
/Library/Perl/Updates/5.18.4/darwin-thread-multi-2level
/Library/Perl/Updates/5.18.4
/System/Library/Perl/5.18/darwin-thread-multi-2level
/System/Library/Perl/5.18
/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.18
.
卸载DBI(尝试:)并再次安装时会发生什么情况?DBIXS.h
是否会在正确的位置结束?@daxim使用Xcode和Xcode命令行工具提供的头文件时似乎有问题您可以通过设置env变量PASTHRU_INC指定缺少的DBIXS.h文件的包含路径,这样:export PASTHRU_INC='-I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/auto/DBI/'。由于驱动程序xst.h,它仍然无法构建。对于这个问题,我必须修改Makefile并更改这个文件的路径。
perl -V
Summary of my perl5 (revision 5 version 18 subversion 4) configuration:
Platform:
osname=darwin, osvers=19.0, archname=darwin-thread-multi-2level
uname='darwin osx391.sd.apple.com 19.0 darwin kernel version 18.0.0: tue jul 9 11:12:08 pdt 2019; root:xnu-4903.201.2.100.7~1release_x86_64 x86_64 '
config_args='-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags= -Dman3ext=3pm -Duseithreads -Duseshrplib -Dinc_version_list=none -Dcc=cc'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags =' -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector',
optimize='-Os',
cppflags='-g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector'
ccversion='', gccversion='4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.32.4) (-macos10.15-objc-selector-opts)', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector'
libpth=/usr/lib /usr/local/lib
libs=
perllibs=
libc=, so=dylib, useshrplib=true, libperl=libperl.dylib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_64_BIT_ALL
USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
USE_REENTRANT_API
Locally applied patches:
/Library/Perl/Updates/<version> comes before system perl directories
installprivlib and installarchlib points to the Updates directory
Built under darwin
Compiled at Aug 23 2019 16:44:31
@INC:
/Library/Perl/5.18/darwin-thread-multi-2level
/Library/Perl/5.18
/Network/Library/Perl/5.18/darwin-thread-multi-2level
/Network/Library/Perl/5.18
/Library/Perl/Updates/5.18.4/darwin-thread-multi-2level
/Library/Perl/Updates/5.18.4
/System/Library/Perl/5.18/darwin-thread-multi-2level
/System/Library/Perl/5.18
/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.18
.