I'm having a difficult time upgrading the libunwind-headers port in macports. I've already looked into the previous post on this:
sudo xcodebuild -license agree
This did not fix the problem.
Here's my terminal output:
new-host-2 [~] % sudo port upgrade outdated
---> Extracting libunwind-headers
Error: org.macports.extract for port libunwind-headers returned: command execution failed
Please see the log file for port libunwind-headers for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_libunwind-headers/libunwind-headers/main.log
Error: Problem while installing libunwind-headers
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Here's my log file:
version:1
:debug:main libunwind-headers has no conflicts
:debug:main Executing org.macports.main (libunwind-headers)
:debug:main changing euid/egid - current euid: 0 - current egid: 0
:debug:main egid changed to: 501
:debug:main euid changed to: 502
:debug:main Skipping completed org.macports.archivefetch (libunwind-headers)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.fetch (libunwind-headers)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.checksum (libunwind-headers)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:extract extract phase started at Wed Nov 6 12:42:26 EST 2013
:notice:extract ---> Extracting libunwind-headers
:debug:extract Executing org.macports.extract (libunwind-headers)
:info:extract ---> Extracting libunwind-35.1.tar.gz
:debug:extract setting option extract.args to '/opt/local/var/macports/distfiles/libunwind-headers/libunwind-35.1.tar.gz'
:debug:extract Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.mac ports.org_release_ports_devel_libunwind-headers/libunwind-headers/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.9'
:debug:extract Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_libunwind-headers/libunwind-headers/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/libunwind-headers/libunwind-35.1.tar.gz' | /usr/bin/gnutar --no-same-owner -xf -'
:debug:extract Executing command line: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_libunwind-headers/libunwind-headers/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/libunwind-headers/libunwind-35.1.tar.gz' | /usr/bin/gnutar --no-same-owner -xf -
:info:extract sh: /usr/bin/gnutar: No such file or directory
:info:extract gzip: error writing to output: Broken pipe
:info:extract gzip: /opt/local/var/macports/distfiles/libunwind-headers/libunwind-35.1.tar.gz: uncompress failed
:info:extract Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_libunwind-headers/libunwind-headers/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/libunwind-headers/libunwind-35.1.tar.gz' | /usr/bin/gnutar --no-same-owner -xf -
:info:extract Exit code: 127
:error:extract org.macports.extract for port libunwind-headers returned: command execution failed
:debug:extract Error code: NONE
:debug:extract Backtrace: command execution failed
while executing
"$procedure $targetname"
:info:extract Warning: targets not executed for libunwind-headers: org.macports.activate org.macports.extract org.macports.patch org.macports.configure org.macports.build org.macports.destroot org.macports.install
:notice:extract Please see the log file for port libunwind-headers for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_libunwind-headers/libunwind-headers/main.log
Does this seem like a bug, or am I doing something incorrectly? I've also tried cleaning it, and uninstalling/re-installing it.
Selfupdating also did not return any errors.
sudo port -v selfupdate
I know it's waaaaay late on this, but for anybody getting here like I did:
sudo ln -s /usr/bin/tar /usr/bin/gnutar
Mavericks apparently changed the file name of tar.
Related
I'm trying to compile http_load inside an alpine docker image.
here is the dockerfile:
FROM alpine:3.5
RUN apk update && apk add wget make gcc linux-headers
WORKDIR /home
RUN wget http://acme.com/software/http_load/http_load-12mar2006.tar.gz && tar xzf http_load-12mar2006.tar.gz
WORKDIR /home/http_load-12mar2006
RUN make
I get this error:
http_load.c:28:20: fatal error: unistd.h: No such file or directory
#include <unistd.h>
^
compilation terminated.
make: *** [Makefile:32: http_load.o] Error 1
I though linux-headers should contain this dependency, and indeed, I can find it here:
/home/http_load-12mar2006 # ls -l /usr/include/linux/unistd.h
-rw-r--r-- 1 root root 157 Oct 25 2016 /usr/include/linux/unistd.h
What is causing this error and how to fix it?
I am trying to start mongod.
I run
sudo service mongod start
but I get:
Failed to unlink socket file /tmp/mongodb-27017.sock Unknown error
Fatal Assertion 40486 at src/mongo/transport/transport_layer_asio.cpp
685
Theres a question here but I have tried all solutions to no avail
Os: Ubuntu 16.04
When I run
ls -lsah /tmp/mongodb-27017.sock
I see:
0 srwx------ 1 mongodb mongodb 0 Jun 14 11:45 /tmp/mongodb-27017.sock
Then I run
rm /tmp/mongodb-27017.sock
sudo service mongod start
When I run
ls -lsah /tmp/mongodb-27017.sock
again, I see:
0 srwx------ 1 mongodb mongodb 0 Jun 14 11:45 /tmp/mongodb-27017.sock
When I run mongod, it gives me the same error.
I had the same problem and noticed this old answer: https://stackoverflow.com/a/34290982/2683681.
You can use their command:
sudo chown `whoami` /tmp/mongodb-27017.sock
But if you're using root then you'd better be doing:
sudo chown mongodb:mongodb /tmp/mongodb-27017.sock
My problem stemmed from the fact that root owned the socket.
I am using mongodb 3.6.3 on a centos 7 aws ec2 instance.
2 Questions (only one needs to be answered):
Why is the --logpath preventing the mongod command if done manually through the cli with sudo mongod --storageEngine etc
Why is sudo service mongod status showing the failure that it is?
When I run the below command, (since currently, sudo service mongod start isn't working but the below works) it fails when I specify the --logpath but will run without it. Unfortunately, when I run it without it, all of my logs end up in the / which is absolutely the wrong location.
sudo mongod --storageEngine wiredTiger --dbpath /data --bind_ip 127.0.0.1,apiIP --logpath /var/log/mongodb/mongod.log --auth --fork
Below is what happens when I try to run that above line as is.
I CONTROL [main] log file "/var/log/mongodb/mongod.log" exists; moved to "/var/log/mongodb/mongod.log.2018-03-16T15-16-01".
From what I can tell, it is conflicting with the currently existent
Just for reference, sudo service mongod status returns:
mongod.service - mongodb database
Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2018-03-16 15:11:53 UTC; 9min ago
Process: 26620 ExecStart=/usr/bin/mongod $OPTIONS run (code=exited, status=2)
Main PID: 26620 (code=exited, status=2)
Mar 16 15:11:53 ip-* systemd[1]: Started mongodb database.
Mar 16 15:11:53 ip-* systemd[1]: Starting mongodb database...
Mar 16 15:11:53 ip-* mongod[26620]: F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongod.log"
Mar 16 15:11:53 ip-* systemd[1]: mongod.service: main process exited, code=exited, status=1/FAILURE
Mar 16 15:11:53 ip-* systemd[1]: Unit mongod.service entered failed state.
Mar 16 15:11:53 ip-* systemd[1]: mongod.service failed.
/etc/mongod.conf
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
# Where and how to store data.
storage:
dbPath: /data
# logpath: /log/mongod.log
journal:
enabled: true
engine: wiredTiger
# mmapv1:
# wiredTiger:
# how the process runs
processManagement:
# fork: true # fork and run in background
pidFilePath: /var/run/mongodb/mongod.pid # location of pidfile
timeZoneInfo: /usr/share/zoneinfo
# network interfaces
net:
port: 27017
bindIp: 127.0.0.1, apiIP
Thanks to #AlexBlex for noticing the spacing issue in the yaml file.
With that sorted, the status error has this line
Unrecognized option: storage.wiredTiger
cd /var/log
sudo mkdir -m 777 mongodb
sudo service mongod start
sudo service mongod status
Hopefully, that's will do!
sudo systemctl enable mongod
sudo systemctl restart mongod
sudo journalctl -u mongod.service
Hopefully, that will do!
Reference: https://stackoverflow.com/a/51286526/122441
After deploying my CakePHP3 project to Ubuntu 14.04 server when I open project in browser I get this error:
Warning: require(/var/www/html/xyz-web/vendor/autoload.php): failed to
open stream: No such file or directory in
/var/www/html/xyz-web/config/bootstrap.php on line 38
Fatal error: require(): Failed opening required
'/var/www/html/xyz-web/vendor/autoload.php'
(include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/html/xyz-web/config/bootstrap.php on line 38
And if I run bin/cake server inside that directory (on the server) I get next output:
Warning: require(/var/www/html/xyz-web/vendor/autoload.php): failed to
open stream: No such file or directory in
/var/www/html/xyz-web/config/bootstrap.php on line 38 PHP Fatal error:
require(): Failed opening required
'/var/www/html/xyz-web/vendor/autoload.php'
(include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/html/xyz-web/config/bootstrap.php on line 38
Fatal error: require(): Failed opening required
'/var/www/html/xyz-web/vendor/autoload.php'
(include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/html/xyz-web/config/bootstrap.php on line 38
How do I solve this?
I solved this issue by installing composer on the server and running it inside a project.
sudo apt-get update && sudo apt-get install curl php5-cli git && curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
and then cd to cake project (cd /var/www/html/{project_name}) and run composer install to install required packages.
When I try to install perlbrew on Mac OS X v10.9 (Mavericks) and MacPorts, this is what happens:
~$ 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.
~$
I then removed ~/perl5/perlbrew and tried:
~$ 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
~$
I'm stuck on the first step. How can I get perlbrew installed properly?
Or you can disable certificate checking. The following worked fine for me:
echo "check-certificate = off" >> ~/.wgetrc
perlbrew install-patchperl
perlbrew install-cpanm
Happy brewing!
Perlbrew installs cleanly for me (also on Mac OS X 10.9.1).
There is an issue report (here) that it is worth you reading through. It seems likely to be an issue with your version of cURL coupled with GitHub HTTPS URLs. There are a couple of things worth trying:
curl -kL http://install.perlbrew.pl | bash
(-k allows insecure SSL connections)
Install patchperl manually:
curl -kL https://raw.github.com/gugod/patchperl-packing/master/patchperl > ~/perl5/perlbrew/bin/patchperl`
Based on a suggestion of #jm666, I tracked down the problem source (at least one of them).
What I did:
Removed perlbrew: rm -rf ~/perl5/* ~/.perlbrew
Completely removed macports
Installed a fresh macports package
And I tried installing my usual MacPorts and after every installed port, started a new terminal/shell and tried installing perlbrew.
After I installed the wget port, the perlbrew installation failed (installing the patchperl). After uninstalling the wget port, perlbrew installed again OK.
For the log, installing 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.
perlbrew curl -kL http://install.perlbrew.pl | bash failed with
ERROR: Failed to retrieve patchperl executable.
Uninstalling the wget port:
$ 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.
Conclusion: Something go wrong with a combination of MacPorts' wget and perlbrew.
Check your PATH order. Watch out for macports PATHs getting added later to the search than the perlbrew paths. I just cleaned out a bunch of "helper" addenda PATHs in .bash_profile, .profile and put everything in .bashrc, in the order in which I want to search, i.e. perlbrew before macports before system. If you are left joining your path, i.e. PATH=/foo:/bar:$PATH, go in reverse order in your start up file than you want the search path to accrue. Below I add the macports /opt/local/bin:/opt/local/sbin to the path before the perlbrew path elements.
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
For me it helped changing the PATH environment variable - disable MacPorts by commenting out the next line.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
or similar in your ~/.profile.
Something doesn't play nicely from the MacPorts binaries in /opt/local/bin with perlbrew.
For example, with enabled macports, for the
perlbrew self-upgrade
you will get
Unable to detect version of new perlbrew!
with disabled macports in a PATH will get correctly:
Your perlbrew is up-to-date.
and like.
After installing perlbrew, and your perlbrew's version of Perl and (ofc) sourcing the perlberw's bashrc you can return the PATH - only don't forget comment out every time when you want use perlbrew itself. And the
source ~/perl5/perlbrew/etc/bashrc
should be after the macports PATH setting.
At least, on my installation - maybe your problem has another roots...