|
开始使用:cpan DBD::mysql 命令来安装该模块 由于是编译的版本的SQL版本,已经在/etc/profile 中修改:export PATH=/usr/local/mysql/bin:$PATH 担心找不到mysql lib文件。 报错如下: # Tried to use 'DBD::mysql'. # Error: Can't load '/root/.cpan/build/DBD-mysql-4.022/blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.16: 无法打开共享对象文件: 没有那个文件或目录 at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230. # at (eval 6) line 2 # Compilation failed in require at (eval 6) line 2. # BEGIN failed--compilation aborted at t/00base.t line 21. FAILED--Further testing stopped: Unable to load DBD::mysql make: *** [test_dynamic] 错误 9 /usr/bin/make test -- NOT OK Running make install make test had returned bad status, won't install without force [root@localhost dbdata_backup]# perl -MCPAN -e shell Terminal does not support AddHistory. cpan shell -- CPAN exploration and modules installation (v1.7602) ReadLine support available (try 'install Bundle::CPAN') 解决方式: shell> perl -MCPAN -e shell cpan> install DBI cpan> install DBD::mysql 安装成功。 手工安装DBD安装技巧: 注意mysql的环境变量,若没有则用 添加/usr/local/mysql/bin到环境变量PATH中 PATH=/usr/local/mysql/bin:$PATH; export PATH (mysql的安装路径根据实际情况填写) wget http://cpan.perl.org/modules/by-module/DBI/DBI-1.601.tar.gz tar -zxvf DBD-mysql-4.006.tar.gz cd DBD-mysql-4.006 perl Makefile.PL –mysql_config=/usr/local/mysql/bin/mysql_config make make test make install |
热门文章更多>>
标签更多>>
专题更多>>
最新文章更多>>
- 团队城市未满足要求:MSBuildTools12.0_x86_Path 存在
- 使用 MSBuild.exe 在发布模式下构建 C# 解决方案
- 当我发布 Web 应用程序时,AfterPublish 脚本不运行
- 构建时 T4 转换的产品仅在下一个构建中使用
- ASP.NET Core Application (.NET Framework) for Windows x64 only error in project.assets.json
- 新的 .csproj 格式 - 如何将整个目录指定为“链接文件"到子目录?
- 如何将条件编译符号(DefineConstants)传递给 msbuild
- MSBuild 支持 Visual Studio 2017 RTM 中的 T4 模板
- NuGet 包还原找不到包,没有源
- 使用 C# 6.0 功能运行 TFS 构建
大大大大大大大鱼