7

当我尝试在Mac OS X v10.9 (Mavericks) 和MacPorts上安装 perlbrew时,会发生以下情况:

~$ curl -L http://install.perlbrew.pl | bash

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0   315    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  1020  100  1020    0     0    649      0  0:00:01  0:00:01 --:--:--  3217

## Download the latest perlbrew

## Installing perlbrew
perlbrew is installed: ~/perl5/perlbrew/bin/perlbrew

perlbrew root (~/perl5/perlbrew) is initialized.

Append the following piece of code to the end of your ~/.bash_profile and start a
new shell, perlbrew should be up and fully functional from there:

    source ~/perl5/perlbrew/etc/bashrc

Simply run `perlbrew` for usage details.

Happy brewing!

## Installing patchperl

ERROR: Failed to retrieve patchperl executable.

~$

然后我删除~/perl5/perlbrew并尝试:

~$ curl -L http://install.perlbrew.pl | bash -x
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0   315    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  1020  100  1020    0     0    693      0  0:00:01  0:00:01 --:--:--  5368
+ PERLBREWURL=https://raw.github.com/gugod/App-perlbrew/master/perlbrew
+ '[' -z /var/folders/7l/nhyscwy14bjb_sxr_t2gynpm0000gn/T/ ']'
+ cd /var/folders/7l/nhyscwy14bjb_sxr_t2gynpm0000gn/T/
+ LOCALINSTALLER=perlbrew-14023
+ echo

+ type curl

+ PERLBREWDOWNLOAD='curl -f -sS -Lo perlbrew-14023 https://raw.github.com/gugod/App-perlbrew/master/perlbrew'
+ echo '## Download the latest perlbrew'
## Download the latest perlbrew
+ curl -f -sS -Lo perlbrew-14023 https://raw.github.com/gugod/App-perlbrew/master/perlbrew
+ echo

+ echo '## Installing perlbrew'
## Installing perlbrew
+ chmod +x perlbrew-14023
+ /usr/bin/perl perlbrew-14023 self-install
perlbrew is installed: ~/perl5/perlbrew/bin/perlbrew

perlbrew root (~/perl5/perlbrew) is initialized.

Append the following piece of code to the end of your ~/.bash_profile and start a
new shell, perlbrew should be up and fully functional from there:

    source ~/perl5/perlbrew/etc/bashrc

Simply run `perlbrew` for usage details.

Happy brewing!

+ echo '## Installing patchperl'
## Installing patchperl
+ /usr/bin/perl perlbrew-14023 -f -q install-patchperl

ERROR: Failed to retrieve patchperl executable.

+ clean_exit 1
+ '[' -f perlbrew-14023 ']'
+ rm perlbrew-14023
+ exit 1
~$

我被困在第一步。如何正确安装 perlbrew?

4

5 回答 5

3

Perlbrew 为我安装干净(也在 Mac OS X 10.9.1 上)。

有一份问题报告(此处)值得您阅读。您的cURL版本加上 GitHub HTTPS URL似乎有问题。有几件事值得尝试:

  1. curl -kL http://install.perlbrew.pl | bash
    -k允许不安全的SSL连接)

  2. 手动安装 patchperl:

    curl -kL https://raw.github.com/gugod/patchperl-packing/master/patchperl > ~/perl5/perlbrew/bin/patchperl`
    
于 2014-01-04T15:30:15.243 回答
3

或者您可以禁用证书检查。以下对我来说很好:

echo "check-certificate = off" >> ~/.wgetrc

perlbrew install-patchperl
perlbrew install-cpanm

快乐酿造!

于 2014-04-28T01:23:49.210 回答
2

根据@jm666 的建议,我找到了问题的根源(至少其中一个)。

我做了什么:

  • 删除 perlbrew:rm -rf ~/perl5/* ~/.perlbrew
  • 完全移除macports
  • 安装了一个新的macports package

我尝试安装我常用的 MacPorts,并在每个安装端口后,启动一个新的终端/shell 并尝试安装perlbrew.

安装完wgetport后,perlbrew安装失败(安装patchperl)。卸载wgetport后,再次安装perlbrew就OK了。

对于日志,安装 wget:

$ sudo port install wget
--->  Computing dependencies for wget
--->  Dependencies to be installed: gnutls libidn libtasn1 nettle p11-kit curl-ca-bundle desktop-file-utils glib2 libffi popt libxslt libxml2 xz libgcrypt libgpg-error pcre bzip2 libedit
--->  Fetching archive for libidn
--->  Attempting to fetch libidn-1.26_0.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/libidn
--->  Attempting to fetch libidn-1.26_0.darwin_13.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/libidn
--->  Installing libidn @1.26_0
--->  Activating libidn @1.26_0
--->  Cleaning libidn
--->  Fetching archive for libtasn1
--->  Attempting to fetch libtasn1-2.11_0.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/libtasn1
--->  Attempting to fetch libtasn1-2.11_0.darwin_13.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/libtasn1
--->  Installing libtasn1 @2.11_0
--->  Activating libtasn1 @2.11_0
--->  Cleaning libtasn1
--->  Fetching archive for nettle
--->  Attempting to fetch nettle-2.6_1.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/nettle
--->  Attempting to fetch nettle-2.6_1.darwin_13.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/nettle
--->  Installing nettle @2.6_1
--->  Activating nettle @2.6_1
--->  Cleaning nettle
--->  Fetching archive for curl-ca-bundle
--->  Attempting to fetch curl-ca-bundle-7.34.0_0.darwin_13.noarch.tbz2 from http://lil.fr.packages.macports.org/curl-ca-bundle
--->  Attempting to fetch curl-ca-bundle-7.34.0_0.darwin_13.noarch.tbz2.rmd160 from http://lil.fr.packages.macports.org/curl-ca-bundle
--->  Installing curl-ca-bundle @7.34.0_0
--->  Activating curl-ca-bundle @7.34.0_0
--->  Cleaning curl-ca-bundle
--->  Fetching archive for libffi
--->  Attempting to fetch libffi-3.0.13_0.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/libffi
--->  Attempting to fetch libffi-3.0.13_0.darwin_13.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/libffi
--->  Installing libffi @3.0.13_0
--->  Activating libffi @3.0.13_0
--->  Cleaning libffi
--->  Fetching archive for glib2
--->  Attempting to fetch glib2-2.38.2_0.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/glib2
--->  Attempting to fetch glib2-2.38.2_0.darwin_13.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/glib2
--->  Installing glib2 @2.38.2_0
--->  Activating glib2 @2.38.2_0
--->  Cleaning glib2
--->  Fetching archive for popt
--->  Attempting to fetch popt-1.16_0.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/popt
--->  Attempting to fetch popt-1.16_0.darwin_13.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/popt
--->  Installing popt @1.16_0
--->  Activating popt @1.16_0
--->  Cleaning popt
--->  Fetching archive for desktop-file-utils
--->  Attempting to fetch desktop-file-utils-0.15_1.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/desktop-file-utils
--->  Attempting to fetch desktop-file-utils-0.15_1.darwin_13.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/desktop-file-utils
--->  Installing desktop-file-utils @0.15_1
--->  Activating desktop-file-utils @0.15_1
--->  Cleaning desktop-file-utils
--->  Fetching archive for xz
--->  Attempting to fetch xz-5.0.5_0.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/xz
--->  Attempting to fetch xz-5.0.5_0.darwin_13.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/xz
--->  Installing xz @5.0.5_0
--->  Activating xz @5.0.5_0
--->  Cleaning xz
--->  Fetching archive for libxml2
--->  Attempting to fetch libxml2-2.9.1_0.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/libxml2
--->  Attempting to fetch libxml2-2.9.1_0.darwin_13.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/libxml2
--->  Installing libxml2 @2.9.1_0
--->  Activating libxml2 @2.9.1_0
--->  Cleaning libxml2
--->  Fetching archive for libxslt
--->  Attempting to fetch libxslt-1.1.28_0.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/libxslt
--->  Attempting to fetch libxslt-1.1.28_0.darwin_13.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/libxslt
--->  Installing libxslt @1.1.28_0
--->  Activating libxslt @1.1.28_0
--->  Cleaning libxslt
--->  Fetching archive for p11-kit
--->  Attempting to fetch p11-kit-0.20.1_0.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/p11-kit
--->  Attempting to fetch p11-kit-0.20.1_0.darwin_13.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/p11-kit
--->  Installing p11-kit @0.20.1_0
--->  Activating p11-kit @0.20.1_0
--->  Cleaning p11-kit
--->  Fetching archive for gnutls
--->  Attempting to fetch gnutls-3.1.10_1.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/gnutls
--->  Attempting to fetch gnutls-3.1.10_1.darwin_13.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/gnutls
--->  Installing gnutls @3.1.10_1
--->  Activating gnutls @3.1.10_1
--->  Cleaning gnutls
--->  Fetching archive for libgpg-error
--->  Attempting to fetch libgpg-error-1.12_0.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/libgpg-error
--->  Attempting to fetch libgpg-error-1.12_0.darwin_13.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/libgpg-error
--->  Installing libgpg-error @1.12_0
--->  Activating libgpg-error @1.12_0
--->  Cleaning libgpg-error
--->  Fetching archive for libgcrypt
--->  Attempting to fetch libgcrypt-1.5.3_0.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/libgcrypt
--->  Attempting to fetch libgcrypt-1.5.3_0.darwin_13.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/libgcrypt
--->  Installing libgcrypt @1.5.3_0
--->  Activating libgcrypt @1.5.3_0
--->  Cleaning libgcrypt
--->  Fetching archive for bzip2
--->  Attempting to fetch bzip2-1.0.6_0.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/bzip2
--->  Attempting to fetch bzip2-1.0.6_0.darwin_13.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/bzip2
--->  Installing bzip2 @1.0.6_0
--->  Activating bzip2 @1.0.6_0
--->  Cleaning bzip2
--->  Fetching archive for libedit
--->  Attempting to fetch libedit-20121213-3.0_0.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/libedit
--->  Attempting to fetch libedit-20121213-3.0_0.darwin_13.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/libedit
--->  Installing libedit @20121213-3.0_0
--->  Activating libedit @20121213-3.0_0
--->  Cleaning libedit
--->  Fetching archive for pcre
--->  Attempting to fetch pcre-8.33_1.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/pcre
--->  Attempting to fetch pcre-8.33_1.darwin_13.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/pcre
--->  Installing pcre @8.33_1
--->  Activating pcre @8.33_1
--->  Cleaning pcre
--->  Fetching archive for wget
--->  Attempting to fetch wget-1.14_5+ssl.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/wget
--->  Attempting to fetch wget-1.14_5+ssl.darwin_13.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/wget
--->  Installing wget @1.14_5+ssl
--->  Activating wget @1.14_5+ssl

To customize wget, you can copy /opt/local/etc/wgetrc.sample to /opt/local/etc/wgetrc and then make changes.

--->  Cleaning wget
--->  Updating database of binaries: 100.0%
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.

perlbrewcurl -kL http://install.perlbrew.pl | bash失败了

ERROR: Failed to retrieve patchperl executable.

卸载 wget 端口:

$ sudo port uninstall wget
--->  Deactivating wget @1.14_5+ssl
--->  Cleaning wget
--->  Uninstalling wget @1.14_5+ssl
--->  Cleaning wget
$
$ rm -rf ~/perl5/perlbrew/ ~/.perlbrew/
$ curl -kL http://install.perlbrew.pl | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0   315    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  1020  100  1020    0     0   1551      0 --:--:-- --:--:-- --:--:--  1551

## Download the latest perlbrew

## Installing perlbrew
perlbrew is installed: ~/perl5/perlbrew/bin/perlbrew

perlbrew root (~/perl5/perlbrew) is initialized.

Append the following piece of code to the end of your ~/.bash_profile and start a
new shell, perlbrew should be up and fully functional from there:

    source ~/perl5/perlbrew/etc/bashrc

Simply run `perlbrew` for usage details.

Happy brewing!

## Installing patchperl

## Done.

结论:MacPortswget.perlbrew

于 2014-01-06T11:03:58.963 回答
0

检查您的 PATH 顺序。注意 macports PATH 比 perlbrew 路径更晚添加到搜索中。我刚刚清理了 .bash_profile、.profile 中的一堆“帮助”附加 PATH,并按照我想要搜索的顺序将所有内容放入 .bashrc 中,即 perlbrew 在 macports 之前在系统之前。如果您要加入您的路径,即 PATH=/foo:/bar:$PATH,请在启动文件中按照与您希望搜索路径累积的相反顺序进行。下面我将 macports /opt/local/bin:/opt/local/sbin 添加到 perlbrew 路径元素之前的路径中。

perl-swine:~ $ cat .bash_profile
[ -r /Users/perl-swine/.bashrc ] && source /Users/perl-swine/.bashrc
# $PATH in .bashrc


perl-swine:~ $ cat .profile
if [ -f ~/.bashrc ]
then
    source ~/.bashrc
fi
# $PATH in .bashrc


perl-swine:~ $ cat .bashrc 
yadda
yadda moving along to the important part
yadda
# macports
PATH=/opt/local/bin:/opt/local/sbin:$PATH
#python
PATH=/Library/Frameworks/Python.framework/Versions/2.6/bin:$PATH
PATH=/Library/Frameworks/Python.framework/Versions/2.7/bin:$PATH
#perlbrew
source /Users/perl-swine/perl5/perlbrew/etc/bashrc
export PATH;

perl-swine:~ $ echo $PATH
/Users/perl-swine/perl5/perlbrew/bin:/Users/perl-swine/perl5/perlbrew/perls/perl-5.18.2/bin:/Library
/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions
/2.6/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt
/X11/bin:/usr/texbin

perl-swine:~ $ which perl
/Users/perl-swine/perl5/perlbrew/perls/perl-5.18.2/bin/perl

perl-swine:~ $ perlbrew list
  perl-5.16.0 (5.16.3)
* perl-5.18.2



perl-swine:~ $ which perl5
/opt/local/bin/perl5

perl-swine:~ $ which perl5.12
/opt/local/bin/perl5.12

perl-swine:~ $ sudo port list installed | grep perl
perl5                          @5.12.4         lang/perl5
perl5.12                       @5.12.4         lang/perl5.12
perl5.16                       @5.16.1         lang/perl5.16


perl-swine:bin $ ls /usr/bin/perl*
-rwxr-xr-x   1 root  wheel  58608 Oct 23 00:47 /usr/bin/perl
-rwxr-xr-x   1 root  wheel  35440 Oct 23 00:54 /usr/bin/perl5.12
-rwxr-xr-x   1 root  wheel  35440 Oct 23 00:47 /usr/bin/perl5.16
于 2014-02-25T08:37:57.147 回答
0

对我来说,它有助于更​​改环境变量 -通过注释下一行来PATH禁用MacPorts 。

export PATH=/opt/local/bin:/opt/local/sbin:$PATH

或类似的~/.profile.

MacPorts 二进制文件中的某些内容不能很好地/opt/local/bin使用perlbrew.

例如,使用 enabled macports,对于

perlbrew self-upgrade

你会得到

无法检测到新 perlbrew 的版本!

在 PATH中禁用macports将正确:

Your perlbrew is up-to-date.

和喜欢。

安装后perlbrew,以及您的 perlbrew 版本的 Perl 和(ofc)采购 perlberw 的bashrc,您可以返回 PATH - 只是不要忘记每次您想使用它自己时注释掉perlbrew。和

source ~/perl5/perlbrew/etc/bashrc

应该macportsPATH 设置之后。

至少,在我的安装中 - 也许你的问题有另一个根源......

于 2014-01-04T20:17:17.333 回答