install_driver(mysql)失败:找不到DBD/mysql.pm [英] install_driver(mysql) failed: Can't locate DBD/mysql.pm

查看:107
本文介绍了install_driver(mysql)失败:找不到DBD/mysql.pm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题不会重复出现,请先阅读我所面临的问题,然后重复回答该问题,如果我重复问题可以帮助我解决问题,将会很有帮助,因为我已经遍历了所有链接和解决方案提到过其他类似的问题,但没有运气.

Question is not repeated, first read the problem which I am facing, then mark it if it is repeated, will be helpful if repeatation of my question helps me in solving my problem, As I have been through all the links and solutions mentioned on other similar questions and problems but no luck.

我正在尝试通过以下链接在ec2-aws-instance上设置redmine git

I am trying to setup redmine git on my ec2-aws-instance with help of below link

https://docs.bitnami. com/installer/how-to/configure-advanced-integration-git-redmine/

我能够将Redmine项目与git存储库正确连接,但是一旦到达以上链接的第三步,我将面临如下问题

I am able to properly connect redmine projects with my git repositories but once I reach third step on above link I am facing issue as below

步骤:-3 配置Git访问控制

以下是尝试使用Redmine用户凭据保护我的git存储库时的错误.

Below is the error when try to secure my git repository with redmine user credentials.

[2019年2月21日星期四17:46:26.918619] [perl:错误] [pid 26820:tid 139790464616192] [客户端127.0.0.1:50156] install_driver(mysql) 失败:无法在@INC中找到DBD/mysql.pm(@INC包含: /opt/bitnami/git/lib/site_perl/5.16.3 /opt/bitnami/perl/lib/5.16.3/x86_64-linux-thread-multi /opt/bitnami/perl/lib/5.16.3 /opt/bitnami/perl/lib/site_perl/5.16.3/x86_64-linux-thread-multi /opt/bitnami/perl/lib/site_perl/5.16.3 /opt/bitnami/perl/lib/5.16.3/x86_64-linux-thread-multi /opt/bitnami/perl/lib/site_perl/5.16.3/x86_64-linux-thread-multi /bitnami/ruby23stack-linux-x64/output/perl/lib/site_perl/5.16.3/x86_64-linux-thread-multi /bitnami/ruby23stack-linux-x64/output/perl/lib/site_perl/5.16.3 /bitnami/ruby23stack-linux-x64/output/perl/lib/5.16.3/x86_64-linux-thread-multi /bitnami/ruby23stack-linux-x64/output/perl/lib/5.16.3. /opt/bitnami/apache2)在(eval 6)第3行.\ n也许是DBD :: mysql perl 模块尚未完全安装,\也可能没有大写 'mysql'不正确.\ n可用的驱动程序:DBM,ExampleP,文件,Gofer, 代理人海绵.\ n位于 /opt/bitnami/perl/lib/site_perl/5.16.3/x86_64-linux-thread-multi/Apache/Redmine.pm 557行.\ n App 26921标准输出:

[Thu Feb 21 17:46:26.918619 2019] [perl:error] [pid 26820:tid 139790464616192] [client 127.0.0.1:50156] install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /opt/bitnami/git/lib/site_perl/5.16.3 /opt/bitnami/perl/lib/5.16.3/x86_64-linux-thread-multi /opt/bitnami/perl/lib/5.16.3 /opt/bitnami/perl/lib/site_perl/5.16.3/x86_64-linux-thread-multi /opt/bitnami/perl/lib/site_perl/5.16.3 /opt/bitnami/perl/lib/5.16.3/x86_64-linux-thread-multi /opt/bitnami/perl/lib/site_perl/5.16.3/x86_64-linux-thread-multi /bitnami/ruby23stack-linux-x64/output/perl/lib/site_perl/5.16.3/x86_64-linux-thread-multi /bitnami/ruby23stack-linux-x64/output/perl/lib/site_perl/5.16.3 /bitnami/ruby23stack-linux-x64/output/perl/lib/5.16.3/x86_64-linux-thread-multi /bitnami/ruby23stack-linux-x64/output/perl/lib/5.16.3 . /opt/bitnami/apache2) at (eval 6) line 3.\nPerhaps the DBD::mysql perl module hasn't been fully installed,\nor perhaps the capitalisation of 'mysql' isn't right.\nAvailable drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge.\n at /opt/bitnami/perl/lib/site_perl/5.16.3/x86_64-linux-thread-multi/Apache/Redmine.pm line 557.\n App 26921 stdout:

没有第三步,我的存储库就公开了,任何知道存储库URL的人都可以克隆我的存储库或对我的git存储库执行其他操作.因此,根据上述文档链接,第三步出于安全目的,这对我来说很重要.

Without third step my repositories are public, any who knows the repo url can clone my repos or perform other operations on my git repos. So third step is for security purpose as per above document link and which is important for me.

按照文档中的说明,一旦我将以下行添加到apache config中,当我尝试克隆存储库时,我在bitnami日志中遇到了以上错误

Once I add below line into apache config as per documentation mentioned I am getting above error in my bitnami log when I try to clone a repository

 <Location "/">
       AuthType Basic
       AuthName "Redmine git repositories"
       Require valid-user

       PerlAccessHandler Apache::Authn::Redmine::access_handler
       PerlAuthenHandler Apache::Authn::Redmine::authen_handler
       RedmineDSN "DBI:mysql:database=bitnami_redmine;host=localhost;mysql_socket=installdir/mysql/tmp/mysql.sock"
       RedmineDbUser "REDMINE_DB_USERNAME"
       RedmineDbPass "REDMINE_DB_PASSWORD"
       RedmineGitSmartHttp yes
     </Location>

当我运行以下命令来克隆存储库时,无需进行文档上的第三步,我就能够正确地克隆存储库,但是在第三步中,我失败了,并且日志中的错误高于命令行中的错误. /p>

When I run a following command to clone a repo, without third step on documentation, I am properly able to clone the repo, but with third step I am failing and getting above error in log and below error on command line.

bitnami@127.0.0.1:/tmp$ git clone http://git.domain.com/test2
Cloning into 'test2'...
fatal: unable to access 'http://git.domain.com/test2/': The requested URL returned error: 500

我什至尝试安装以下软件包,但没有运气

I have even tried installing below package but no luck

sudo apt-get install libdbd-mysql-perl

我的操作系统是

Ubuntu 16.04.5 LTS \n \l

推荐答案

为了使Perl安装能够与MySQL数据库对话,它需要使用DBD :: mysql模块.该模块不是标准Perl安装的一部分,需要单独安装.使用CPAN命令行工具(cpan DBD::mysql)或使用apt-get(apt-get install libdbd-mysql-perl)安装它时,它将安装在系统Perl使用的库目录中(作为操作系统一部分安装的库). .您可以通过运行以下命令来确认已正确安装了该软件:

In order for a Perl installation to talk to a MySQL database, it needs to use the DBD::mysql module. This module isn't part of the standard Perl installation and needs to be installed separately. When you install it using the CPAN command line tool (cpan DBD::mysql) or using apt-get (apt-get install libdbd-mysql-perl) it is installed in the library directories used by the system Perl (the one that is installed as part of your operating system). You can confirm that this has been installed correctly by running the following commands:

$ perldoc DBD::mysql
$ perl -MDBD::mysql -le'print $DBD::mysql::VERSION'

如果正确安装了DBD :: mysql,则第一个命令将向您显示该模块的文档,第二个命令将提供版本号.

If DBD::mysql is installed correctly, the first command will show you the documentation for the module and the second will give the version number.

但是,正如我所说的,它已安装供系统Perl安装使用.从错误消息中看来,您看到您的Bitnami安装未使用系统Perl.相反,它使用安装在/opt/bitnami中的单独的Perl安装.

But, as I said, this is installed for use by the system Perl installation. It appears from the error message you're seeing that your Bitnami installation isn't using the system Perl. It is, instead, using a separate Perl installation which is installed in /opt/bitnami.

因此,您需要在此Perl安装的模块库中安装DBD :: mysql.可以要求cpan在其他目录中安装模块,但我会警惕仅将内容安装到Bitnami的目录树中.我强烈怀疑在此过程的较早阶段已跳过了安装步骤.如果Bitnami需要使用Perl程序中的MySQL并安装带有自己的模块库的Perl发行版,则它应该在安装中包括DBD :: mysql或提供有关如何安装它的明确说明.

So you need to get DBD::mysql installed in the module library for this Perl installation. It's possible to ask cpan to install a module in a different directory, but I'd be wary about just installing stuff into Bitnami's directory tree. I strongly suspect that an installation step has been skipped far earlier in the process. If Bitnami needs to use MySQL from a Perl program and installs its own Perl distribution complete with its own module library, then it should either include DBD::mysql in its installation or provide clear instructions on how to install it.

我的建议是仔细阅读Bitnami的安装说明,并了解他们对安装MySQL支持的看法.如果那不起作用,您应该将这个问题带到Bitnami的支持渠道.

My suggestion would be to carefully go over the installation instructions for Bitnami and see what they have to say about installing MySQL support. If that doesn't work, you should take this question to Bitnami's support channels.

这篇关于install_driver(mysql)失败:找不到DBD/mysql.pm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆