我正在運行Amazon EC2實例(uname -r給出「3.4.43-43.43.amzn1.x86_64」)並嘗試設置DBD :: mysql用於我的Perl腳本。在Amazon EC2上安裝DBD :: mysql時無法找到mysql_config
安裝DBD :: mysql的與cpanm:cpanm --sudo DBD::mysql
這與以下日誌文件返回一個錯誤:
You have /usr/bin/unzip Searching DBD::mysql on cpanmetadb ...
--> Working on DBD::mysql Fetching http://www.cpan.org/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.023.tar.gz
-> OK Unpacking DBD-mysql-4.023.tar.gz Entering DBD-mysql-4.023 Checking configure dependencies from META.yml Checking if you have DBI
1.08 ... Yes (1.627) Configuring DBD-mysql-4.023 Running Makefile.PL 64 lines yanked 1,1 Top
perl Makefile.PL --testuser=username
Can't exec "mysql_config": No such file or directory at Makefile.PL line 479.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 479.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 479. Failed to determine directory of mysql.h. Use
perl Makefile.PL --cflags=-I<dir>
to set this directory. For details see the INSTALL.html file, section "C Compiler flags" or type
perl Makefile.PL --help Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
-> N/A
-> FAIL Configure failed for DBD-mysql-4.023. See /home/ec2-user/.cpanm/work/1373404386.28268/build.log for details.
我試圖在整個系統上搜索mysql_config和一無所獲。我搜索了幾個小時並沒有找到解決方案。任何幫助深表感謝!由於
其Linux發行版? – ysth