unzip: invalid Zip Magic 0A0A0A0A - docker

I am creating a Docker image
in the dockerfile adding the ZIPped file of an agent from github using curl
it downloads successfully , but when i run unzip i get this error
---> Running in 4fa3caf0a552 % Total % Received % Xferd Average
Speed Time Time Time Current
Dload Upload Total Spent Left Speed 100 28576 0 28576 0 0 38720 0 --:--:-- --:--:--
--:--:-- 38668 Archive: java-agent.zip unzip: invalid zip magic 0A0A0A0A

Related

Heroku Deployment of Spring Boot App from Circle CI failed

I'm trying to deploy the Spring boot app through Circle CI pipeline in Heroku. Below is the error I'm getting. I couldn't figure out the root cause. Please help to resolve.
#!/bin/bash -eo pipefail
set -x
sudo curl https://cli-assets.heroku.com/install.sh | sh
HEROKU_API_KEY=${HEROKU_API_KEY} heroku container:login
HEROKU_API_KEY=${HEROKU_API_KEY} heroku container:push -a menustage web
HEROKU_API_KEY=${HEROKU_API_KEY} heroku container:release -a menustage web
+ sudo curl https://cli-assets.heroku.com/install.sh
+ sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1894 100 1894 0 0 55705 0 --:--:-- --:--:-- --:--:-- 55705
This script requires superuser access.
You will be prompted for your password by sudo.
Installing CLI from https://cli-assets.heroku.com/heroku-linux-x64.tar.xz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 27.2M 100 27.2M 0 0 8255k 0 0:00:03 0:00:03 --:--:-- 8255k
v14.19.0
heroku installed to /usr/local/bin/heroku
› Warning: HEROKU_API_KEY set to [REDACTED]
› Warning: Our terms of service have changed:
› https://dashboard.heroku.com/terms-of-service
heroku/7.62.0 linux-x64 node-v14.19.0
+ HEROKU_API_KEY=************************************
+ heroku container:login
WARNING! Your password will be stored unencrypted in /home/circleci/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
+ HEROKU_API_KEY=************************************
+ heroku container:push -a menustage web
▸ No images to push
Exited with code exit status 1
CircleCI received exit code 1

iOS Map box installation using .netrc file

Even I am facing the same issue, I followed steps from below URL, https://docs.mapbox.com/ios/maps/overview/ for setting up a secret and public tokens, but still getting the same issue
[!] Error installing Mapbox-iOS-SDK [!] /usr/bin/curl -f -L -o /var/folders/mk/dxhjgx491qs_r3dq0hbt7k5mk9qp25/T/d20200914-2904-qefyh6/file.zip https://api.mapbox.com/downloads/v2/mobile-maps/releases/ios/packages/6.1.0/mapbox-ios-sdk-dynamic.zip --create-dirs --netrc-optional --retry 2
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:00:06 --:--:-- 0 curl: (22) The requested URL returned error: 401 Unauthorized
Issue resolved, we need to add .netrc in the home directory of your Mac, I was trying to add that file in the project home directory.
All the required pods are installed without any error.

GooglePlacePicker doesn’t install via cocoa pods

I've tried to install GooglePlacePicker several times through Cocoapods, but I always get this error
[!] Error installing GooglePlacePicker
[!] /usr/bin/curl -f -L -o /var/folders/tk/yn2rtpyx055g343t53hmqpqc0000gn/T/d20170925-37639-2bym7v/file.tgz https://dl.google.com/dl/cpdc/2239f9d09050c05e/GooglePlacePicker-2.4.0.tar.gz --create-dirs --netrc-optional
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:02:40 --:--:-- 0
curl: (56) SSLRead() return error -9806
I also tried to install it manually, but this also did not work for me, since browsers (Safari, Chrome) do not download the archive by reference. When I removed the GooglePlacePicker from the Podfile, the pods were installed well. How can I fix this problem?
I made the APN settings restart from my modem, then tried to install pods again and it works for me.

Docker Build: Missing Dependency

When my Docker build reaches this part of the Dockerfile:
ARG cabal=1.22.9.0
RUN curl -L http://hackage.haskell.org/package/cabal-install-${cabal}/cabal-install-${cabal}.tar.gz | tar -xzf- && \
cd cabal-install-${cabal} && \
EXTRA_CONFIGURE_OPTS= ./bootstrap.sh --global
It eventually ends with this error.
Downloading zlib-0.6.1.1...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 139k 0 139k 0 0 293k 0 --:--:-- --:--:-- --:--:-- 293k
[1 of 1] Compiling Main ( Setup.hs, Setup.o )
Linking Setup ...
Configuring zlib-0.6.1.1...
Setup: Missing dependency on a foreign library:
* Missing (or bad) header file: zlib.h
* Missing C library: z
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
Error during cabal-install bootstrap:
Configuring the zlib package failed.
The command '/bin/sh -c curl -L http://hackage.haskell.org/package/cabal-install-${cabal}/cabal-install-${cabal}.tar.gz | tar -xzf- && cd cabal-install-${cabal} && EXTRA_CONFIGURE_OPTS= ./bootstrap.sh --global' returned a non-zero code: 2
Is there something I can include in my Dockerfile that can prevent this?

Error installing RVM: requiring BASH 3.2.25 (you have 4.3.42(4)-release)

I'm attempting to install RVM, and I have a more recent version of BASH. I assume that it needs a version that is 3.2.25 or more recent. I've seen a few post online about it, but they've all been dated or no longer relevant to the current code. Here is what I put in cmd (I have Windows 10 pro).
curl -L https://get.rvm.io | bash -s stable --autolibs=enabled --ruby --rails
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 184 100 184 0 0 143 0 0:00:01 0:00:01 --:--:-- 155
100 22865 100 22865 0 0 9566 0 0:00:02 0:00:02 --:--:-- 45730
Input file specified two times.
BASH 3.2.25 required (you have 4.3.42(4)-release)
The error "Input file specified two times," displayed when the check was run, is output from the Windows sort command. If you run this command it will show you which instance of the sort command is being run:
which sort
To ensure the correct version is always used, alter your PATH to include the typical Bash executable paths (/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin) before any Windows ones. Or, simply remove the Windows paths from your PATH.
Where you change this depends on how you've installed Bash (Cygwin, git-bash, etc.) but is typically a file in your home directory called .profile or .bash_profile.
My problem is ~/.bash_profile,
Because your head is wrong.
If you are using:
export PATH=some/other/path:${PATH}
Let's change to:
export PATH=${PATH}:some/other/path
Hope this help!

Resources