Installing perlbrew: Failed to retrieve patchperl executable - macports

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...

Related

Why does my Google App Engine preinstall script fail due to Ubuntu (security.ubuntu.com) returning 404?

Goal: I am trying to make puppeteer run on GAE flex instance.
Intermediate Goal (and source of problem): installing dependencies during a GAE flex instance gcloud app deploy
Add. Info:
I had puppeteer previously running on a standard env, but now I need a flex
instance bc websockets are not supported in standard.
What have I tried
I tried following this advice. This gentleman apparently made it work:
by adding this in scripts in package.json:
"preinstall": "apt-get update && apt-get -y install gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget",
Just for fun, I tried apt instead of apt-get. I also tried to pretty crudely copy paste the RUN script instead given here for a different use case:
apt-get update \
&& apt-get install -y wget gnupg \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
But they all fail on some variation of 404 from security.ubuntu ? They all lead to something like this:
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python3.5/libpython3.5-minimal_3.5.2-2ubuntu0~16.04.12_amd64.deb 404 Not Found [IP: 91.189.88.142 80]
Step #1:
Step #1: E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python3.5/python3.5-minimal_3.5.2-2ubuntu0~16.04.12_amd64.deb 404 Not Found [IP: 91.189.88.142 80]
Step #1:
Step #1: E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python3.5/libpython3.5-stdlib_3.5.2-2ubuntu0~16.04.12_amd64.deb 404 Not Found [IP: 91.189.88.142 80]
Step #1:
Step #1: E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python3.5/python3.5_3.5.2-2ubuntu0~16.04.12_amd64.deb 404 Not Found [IP: 91.189.88.142 80]
Step #1:
Step #1: E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/libp/libproxy/libproxy1v5_0.4.11-5ubuntu1.1_amd64.deb 404 Not Found [IP: 91.189.88.142 80]
Step #1:
Step #1: E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/x/xdg-utils/xdg-utils_1.1.1-1ubuntu1.16.04.3_all.deb 404 Not Found [IP: 91.189.88.142 80]
Step #1:
I frequently read that puppeteer on flex cannot be done, but I am failing WAY earlier. Does anybody know why my build is not running through? The server does indeed reply 404 for those urls given. What is going on?

RHEL 8 Container MSSQL ODBC Driver e2fsprogs

I'm trying to build a custom docker container using the RHEL 8 UBI. As part of this I want to install the MSSQL 17 ODBC driver.
I've followed the steps outlined in Microsofts Documentation here:
https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15#redhat17
And added the Microsoft repo to my yum.repos.d directory however when I try to build the container I get the following error: nothing provides e2fsprogs needed by msodbcsql17-17.6.1.1-1.x86_64
When I dug a bit further into this it looks as though it looks as though for RHEL-7 Microsoft suggest installing e2fsprogs manually you can see that here: https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15#offline-installation
This unfortunately isn't possible in RHEL-8 as e2fsprogs-static has been removed: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/considerations_in_adopting_rhel_8/index#removed-packages_changes-to-packages
The full output from the build is:
$ docker build -f ./test.dockerfile -t daark:1 .
Sending build context to Docker daemon 25.77MB
Step 1/7 : FROM registry.redhat.io/ubi8/ubi
---> a1f8c9699786
Step 2/7 : RUN curl https://packages.microsoft.com/config/rhel/8/prod.repo > /etc/yum.repos.d/mssql-release.repo
---> Using cache
---> 90b3e1514239
Step 3/7 : RUN yum search odbc
---> Using cache
---> b26f78d0da28
Step 4/7 : RUN yum search msodbcsql17
---> Using cache
---> c6f7751b97dc
Step 5/7 : ENV ACCEPT_EULA=Y
---> Using cache
---> 2b0003944673
Step 6/7 : RUN yum install -y unixODBC unixODBC-devel
---> Using cache
---> 1d0b8c594905
Step 7/7 : RUN yum install -y msodbcsql17
---> Running in 67c30e75fb42
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:08:11 ago on Wed Aug 5 09:36:32 2020.
Error:
Problem: cannot install the best candidate for the job
- nothing provides e2fsprogs needed by msodbcsql17-17.6.1.1-1.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
The command '/bin/sh -c yum install -y msodbcsql17' returned a non-zero code: 1
This error is pretty reproducible here is the test dockerfile i'm using to debug
FROM registry.redhat.io/ubi8/ubi
RUN curl https://packages.microsoft.com/config/rhel/8/prod.repo > /etc/yum.repos.d/mssql-release.repo
RUN yum search odbc
RUN yum search msodbcsql17
ENV ACCEPT_EULA=Y
RUN yum install -y unixODBC unixODBC-devel
RUN yum install -y msodbcsql17
Has anyone managed to get this ODBC driver installed on an RHEL 8 UBI based container?
I found a work around that I hope will help the next person to hit this.
Rather than running yum install -y msodbcsql17 I instead used yum to download the RPM
yum download -y msodbcsql17
then used rpm -Uvh --nodeps msodbcsql17*rpm to install it.
You can use this docker file:
FROM registry.redhat.io/ubi8/ubi
RUN curl https://packages.microsoft.com/config/rhel/8/prod.repo > /etc/yum.repos.d/mssql-release.repo
RUN yum search odbc
RUN yum search msodbcsql17
ENV ACCEPT_EULA=Y
RUN yum install -y unixODBC unixODBC-devel
RUN yum download -y msodbcsql17
RUN rpm -Uvh --nodeps msodbcsql17*rpm
#daark thank you for posting your solution. Your solution got me over the problem I was facing. I ended modifying your solution to the following (in case it helps anyone else):
FROM registry.access.redhat.com/ubi8/python-38
USER root
RUN yum update --assumeyes && \
yum install --assumeyes \
unixODBC-devel \
&& yum clean all
RUN curl https://packages.microsoft.com/config/rhel/8/prod.repo > /etc/yum.repos.d/mssql-release.repo
RUN yum download -y msodbcsql17
RUN ACCEPT_EULA=y rpm -Uvh --nodeps msodbcsql17*rpm
I tried to add this to the #daark's solution as a comment, but it was too difficult to display the code properly.
Good luck to anyone else facing this issue 🍀
Latest msodbcsql17 release fixes this issue. The documentation steps work smooth once again. See docs issue
I can confirm that installation on redhat/ubi8 works with msodbcsql17-17.8.1.2-1.x86_64.rpm.
FROM redhat/ubi8
COPY msodbcsql17-17.8.1.2-1.x86_64.rpm /tmp
RUN MSSQL_PID=Developer ACCEPT_EULA=Y yum -y localinstall /tmp/msodbcsql17-17.8.1.2-1.x86_64.rpm; rm /tmp/msodbcsql17-17.8.1.2-1.x86_64.rpm

CakePHP Installation Error, Failed to open stream

I am planning to learn cakePHP. I already installed composer globally, but whenever I run composer self-update && composer create-project --prefer-dist cakephp/app my_app, I get an error saying:
[ErrorException]
copy(/Users/a/.composer/cache/files/cakephp/cakephp/4528680ebd888b7778e5755c957f
c9a26a0d10d1.zip):failed to open stream: Permission denied.
To be exact, this error runs after the ff things:
- Installing cakephp/plugin-installer(1.1.0): Loading from cache
- Installing aura/intl (3.0.0): Loading from cache
- Installing psr/http-message (1.0.1): Loading from cache
- Installing zendframework/zend-diactoros (1.7.2): Loading from cache
- Installing psr/log (1.0.2): Loading from cache
- Installing cakephp/chronos (1.1.4): Loading from cache
- Installing cakephp/cakephp (3.6.5): Downloading (100%)
I also tried running
sudo composer self-update && composer create-project --prefer-dist cakephp/app my_app
but still the error persists. Any ideas why this is happening?
Change directory to your project directory:
cd cakePHPproject
if you know under what user your web server is running then:
chown -R "userWebserverIsRunning" . * without " "
above will recursively (-R) change the owner of the files in your current directory (.)
Also set:
chmod -R 777 tmp
chmod -R 777 logs
PS, If you do not know under what user your webserver is running please run:
ps -ef | egrep '(httpd|apache2|apache)' | grep -v `whoami` | grep -v root | head -n1 | awk '{print $1}'
You can read more on cake's documentation:
https://book.cakephp.org/3.0/en/tutorials-and-examples/blog/blog.html#directory-permissions-on-tmp-and-logs
Have fun!
Set the ownership for the cache directory using chown -R this will recursively change ownership for all files and folders inside cache directory if any
Reference

GET / - - - - ms in meanio

I have installed the mean stack with the instructions below:
$ curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash
$ sudo apt-get update
$ sudo apt-get install nodejs
$ npm install -g gulp
$ npm install -g bower
$ sudo npm install -g mean-cli
$ mean init testApp
$ cd testApp && npm install
Whenever I run the gulp command it starts successfully and shows the last line:
Mean app started on port 3000 (development) cluster.worker.id: 0
[12:09:03] index.html reloaded.
After that if I go to localhost:3000 the page reloads in an infinite loop and shows the following output on the terminal:
Mean app started on port 3000 enter code here`(development) cluster.worker.id: 0
[12:09:03] index.html reloaded.
GET / - - - - ms
GET / - - - - ms
GET / - - - - ms
Cross check permissions on the npm also change owner from root.

Error while extracting libunwind-headers on OS X Mavericks

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.

Resources