git svn 错误 Can't locate SVN/Core.pm 的解决方案
2023-09-11 14:22:07 时间
【错误场景】
组里面要把代码从svn服务器里整体迁移到git上,准备两步走。
第一步,用 git svn转换成git仓库,
第二步,把git仓库提交到git服务器上。
本来是很快乐的事情,然而勇者在买装备的时候遇到了麻烦,在git svn的时候出错了。魔王只能再等我一会了。
操作系统:
[counsellor@localhost git]$ cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
git版本:
[counsellor@localhost git]$ git --version
git version 2.12.0
svn版本:
[counsellor@localhost git]$ svn --version
svn, version 1.9.4 (r1740329)
compiled Jul 14 2016, 12:41:14 on x86_64-redhat-linux-gnu
perl版本:
[counsellor@localhost git]$ perl --version
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
(with 29 registered patches, see perl -V for more detail)
Copyright 1987-2012, Larry Wall
错误提示:
cmd> git svn clone https://svn.xxxxxx.com/svn/myrepo --username=admin --no-metadata --authors-file=users.txt myrepo
Can't locate SVN/Core.pm in @INC (@INC contains: /usr/local/share/perl5 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/share/perl5/Git/SVN/Utils.pm line 6.
BEGIN failed--compilation aborted at /usr/local/share/perl5/Git/SVN/Utils.pm line 6.
Compilation failed in require at /usr/local/share/perl5/Git/SVN.pm line 32.
BEGIN failed--compilation aborted at /usr/local/share/perl5/Git/SVN.pm line 32.
Compilation failed in require at /usr/local/libexec/git-core/git-svn line 21.
BEGIN failed--compilation aborted at /usr/local/libexec/git-core/git-svn line 21.
【解决方案】
yum install subversion-perl
【问题分析】
先找到报错的第一现场:
/usr/local/share/perl5/Git/SVN/Utils.pm line 6
看代码:
package Git::SVN::Utils;
use strict;
use warnings;
use SVN::Core;
可以看到是use SVN::Core;
调用svn模块时,perl代码提示找不到svn模块。所以说明perl里没有svn相关的库,安装即可。
相关文章
- ASP .NET CORE MVC 部署Windows 系统上 IIS具体步骤---.Net Core 部署到 IIS位系统中的步骤
- Unity3d设置QualitySettings为Beautiful Xcode发布错误
- eclipse下载与安装步骤详解,包含解决错误(最全最详细,多图)
- algid parse error, not a sequence错误
- (org.jbehave.core.failures.BeforeOrAfterFailed: webdriver selenium错误解决。
- 关于WIN8使用 VMware player 6 出现“开机时出错:内部错误”的解决
- ASP.NET Core 6框架揭秘实例演示[32]:错误页面的N种呈现方式
- ASP.NET Core应用的错误处理[3]:ExceptionHandlerMiddleware中间件如何呈现“定制化错误页面”
- ASP.NET Core应用的错误处理[1]:三种呈现错误页面的方式
- Angular 服务器端渲染应用的一个错误消息 type ReferenceError - localStorage is not defined
- SAP Commerce Cloud 2011装好之后,访问Accelerator时遇到错误
- 关于错误Resource interpreted as Script but transferred with MIME type text_html
- 如何通过单步调试的方式找到引起 Fiori Launchpad 路由错误的原因试读版
- QT 常见错误
- mybatis配置的常见错误 org.apache.ibatis.exceptions.PersistenceException Unknown database Cannot find class
- 【错误记录】Android Studio 中生成测试覆盖率报告出错 ( ExampleInstrumentedTest > useAppContext[Pixel 2 - 9] FAILED )
- atitit.404错误的排查流程总结vOa6
- ubuntu查看core dumped的详细错误原因
- C++程序启动时报“0xc0000022”无法启动的错误
- Net Core 微服务 - 如何在docker容器里运行一个简单的.net core web api 服务
- Extjs grid 获取json数据时报各种错误的原因(缺少分号,语法错误)
- 关于Recon-ng的“[!] Unable to synchronize module index. (ConnectionError),等一系列ConnectionError错误”
- Mysql错误1452 - Cannot add or update a child row: a foreign key constraint fails 原因及解决方法
- 解决办法:Azure V*P*N链接错误 找不到可用于此可扩展身份验证协议的证书。 (错误 798)