简体   繁体   English

如何删除 perlbrew 版本/安装?

[英]How to remove perlbrew versions/installations?

I'm running perl-5.32.0 on an Ubuntu VM, and I keep getting this warning every time I open a new terminal:我在 Ubuntu VM 上运行 perl-5.32.0,每次打开新终端时都会收到此警告:

ERROR: The installation "perl-5.30.0" is unknown.

I removed directories to old versions, which caused this error (disk space is at a premium).我删除了旧版本的目录,这导致了这个错误(磁盘空间非常宝贵)。

I don't see a command within the perlbrew menu that can remove a version.我在 perlbrew 菜单中没有看到可以删除版本的命令。 I've run perlbrew clean which cleaned up a lot of disk space, but I still get the error.我已经运行perlbrew clean清理了很多磁盘空间,但我仍然得到错误。

I've thought about editing the header file我考虑过编辑 header 文件

con@V:~/.perlbrew$ cat init 
# DO NOT EDIT THIS FILE
export PERLBREW_MANPATH="/home/con/perl5/perlbrew/perls/perl-5.30.0/man"
export PERLBREW_PATH="/home/con/perl5/perlbrew/bin:/home/con/perl5/perlbrew/perls/perl-5.30.0/bin"
export PERLBREW_PERL="perl-5.30.0"
export PERLBREW_ROOT="/home/con/perl5/perlbrew"
export PERLBREW_VERSION="0.86"

but given # DO NOT EDIT THIS FILE I don't think I should do that.但鉴于# DO NOT EDIT THIS FILE ,我认为我不应该这样做。

How can I get rid of the error ERROR: The installation "perl-5.30.0" is unknown.如何摆脱错误ERROR: The installation "perl-5.30.0" is unknown. ? ?

To uninstall a perl version within perlbrew use:要在perlbrew卸载perl 版本,请使用:

perlbrew uninstall <name>

The <name> is one from perlbrew list . <name>perlbrew list中的一个。

The message is due to perlbrew trying to use a non-existent installation.该消息是由于perlbrew尝试使用不存在的安装。 The solution isn't removing a perlbrew-installed Perl;该解决方案不会删除安装 perlbrew 的 Perl; [1] the solution it simply to tell it to start using an existing one. [1]解决方案只是告诉它开始使用现有的解决方案。

To get the list of perlbrew-managed builds and switch to an existing one:要获取 perlbrew 管理的构建列表并切换到现有构建:

perlbrew list
perlbrew switch {id}

To turn off perlbrew (eg if you have no perlbrew-managed installations left):要关闭 perlbrew(例如,如果您没有 perlbrew 管理的安装):

perlbrew switch-off

It can be reinstated using perlbrew switch .可以使用perlbrew switch恢复它。


  1. To answer the title question, even though it you won't help you personally here, you can use the following to uninstall a perlbrew-managed build of Perl:要回答标题问题,即使您不会在这里亲自帮助您,您也可以使用以下命令卸载由 perlbrew 管理的 Perl 构建:

     perlbrew uninstall {id}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM