I'm trying to install jenkins on Ubuntu14.04 following this site.
After executing the last step, the terminal shows this error:
Err https://pkg.jenkins.io/debian-stable/ binary/ jenkins 2.235.5
gnutls_handshake() failed: Handshake failed
E: Failed to fetch https://pkg.jenkins.io/debian-stable/binary/jenkins_2.235.5_all.deb gnutls_handshake() failed: Handshake failed
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
I tried to run sudo apt-get update --fix-missing (no errow shown after running this cmd) but it doesn't help.
I also tried to install by downloading jenkins.war but the jenkins service isn't enabled after installing.
Please show me how to fix this issue.
The issue seems to be upstream (I have hit the same snag this morning trying to update one of my jenkins installls).
You could use wget and dpkg to fetch and install the deb package:
wget https://pkg.jenkins.io/debian-stable/binary/jenkins_2.235.5_all.deb && sudo dpkg -i jenkins_2.235.5_all.deb
Which will get you Jenkins installed.
Related
I have a docker container that install odbc17 as per https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16&tabs=alpine18-install%2Cubuntu17-install%2Cdebian8-install%2Credhat7-13-install%2Crhel7-offline that has been working for past month in Azure
RUN if ! [[ "16.04 18.04 20.04 21.04 21.10" == *"$(lsb_release -rs)"* ]]; \
then \
echo "Ubuntu $(lsb_release -rs) is not currently supported."; \
exit; \
fi
RUN sudo su
RUN apt-get update && apt-get install -y gnupg2
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
RUN curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list > /etc/apt/sources.list.d/mssql-release.list
RUN exit
RUN sudo apt-get update
RUN sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17
But now it is failing with the return:
The command '/bin/sh -c sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17' returned a non-zero code: 100
looking through the build trace, I see:
2023-02-14T11:24:14.9398390Z Preparing to unpack .../libodbc1_2.3.11_amd64.deb ...
2023-02-14T11:24:14.9410458Z Unpacking libodbc1:amd64 (2.3.11) ...
2023-02-14T11:24:14.9446555Z dpkg: error processing archive /var/cache/apt/archives/libodbc1_2.3.11_amd64.deb (--unpack):
2023-02-14T11:24:14.9448446Z trying to overwrite '/usr/lib/x86_64-linux-gnu/libodbc.so.2.0.0', which is also in package libodbc2:amd64 2.3.9-5
2023-02-14T11:24:14.9453201Z dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
2023-02-14T11:24:14.9600783Z Selecting previously unselected package odbcinst1debian2:amd64.
2023-02-14T11:24:14.9657111Z Preparing to unpack .../odbcinst1debian2_2.3.11_amd64.deb ...
2023-02-14T11:24:14.9670061Z Unpacking odbcinst1debian2:amd64 (2.3.11) ...
2023-02-14T11:24:14.9702481Z dpkg: error processing archive /var/cache/apt/archives/odbcinst1debian2_2.3.11_amd64.deb (--unpack):
2023-02-14T11:24:14.9703365Z trying to overwrite '/usr/lib/x86_64-linux-gnu/libodbcinst.so.2.0.0', which is also in package libodbcinst2:amd64 2.3.9-5
2023-02-14T11:24:14.9712820Z dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
2023-02-14T11:24:14.9879447Z Selecting previously unselected package odbcinst.
2023-02-14T11:24:14.9879982Z Preparing to unpack .../odbcinst_2.3.11_amd64.deb ...
2023-02-14T11:24:14.9896590Z Unpacking odbcinst (2.3.11) ...
2023-02-14T11:24:14.9924471Z dpkg: error processing archive /var/cache/apt/archives/odbcinst_2.3.11_amd64.deb (--unpack):
2023-02-14T11:24:14.9925203Z trying to overwrite '/etc/odbc.ini', which is also in package unixodbc-common 2.3.9-5
2023-02-14T11:24:15.0031636Z Selecting previously unselected package unixodbc.
2023-02-14T11:24:15.0086839Z Preparing to unpack .../unixodbc_2.3.11_amd64.deb ...
2023-02-14T11:24:15.0099782Z Unpacking unixodbc (2.3.11) ...
2023-02-14T11:24:15.0345718Z Selecting previously unselected package msodbcsql17.
2023-02-14T11:24:15.0408910Z Preparing to unpack .../msodbcsql17_17.10.2.1-1_amd64.deb ...
2023-02-14T11:24:15.1308373Z debconf: unable to initialize frontend: Dialog
2023-02-14T11:24:15.1308981Z debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
2023-02-14T11:24:15.1309532Z debconf: falling back to frontend: Readline
2023-02-14T11:24:15.1900197Z Unpacking msodbcsql17 (17.10.2.1-1) ...
2023-02-14T11:24:15.2861152Z Errors were encountered while processing:
2023-02-14T11:24:15.2911953Z /var/cache/apt/archives/libodbc1_2.3.11_amd64.deb
2023-02-14T11:24:15.2913469Z /var/cache/apt/archives/odbcinst1debian2_2.3.11_amd64.deb
2023-02-14T11:24:15.2913914Z /var/cache/apt/archives/odbcinst_2.3.11_amd64.deb
2023-02-14T11:24:15.3017753Z [91mW: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
2023-02-14T11:24:15.3019957Z W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
2023-02-14T11:24:15.3021244Z E: Sub-process /usr/bin/dpkg returned an error code (1)
Can anyone help me figure out how to overcome?
I am trying to use packer with GCP in gitlab-ci but every time I get to the packer build it will fail with the following error:
starting remote command: chmod +x /tmp/script_5147.sh; DEBIAN_FRONTEND='noninteractive' PACKER_BUILDER_TYPE='googlecompute' PACKER_BUILD_NAME='my_vm' /tmp/script_5147.sh
==> googlecompute.my_vm: /tmp/script_5147.sh: line 1: {message:401 Unauthorized}: command not found
2022/11/13 13:26:05 [INFO] 0 bytes written for 'stdout'
2022/11/13 13:26:05 packer-plugin-googlecompute_v1.0.16_x5.0_linux_amd64 plugin: 2022/11/13 13:26:05 [ERROR] Remote command exited with '127': chmod +x /tmp/script_5147.sh; DEBIAN_FRONTEND='noninteractive' PACKER_BUILDER_TYPE='googlecompute' PACKER_BUILD_NAME='my_vm' /tmp/script_5147.sh
2022/11/13 13:26:05 packer-plugin-googlecompute_v1.0.16_x5.0_linux_amd64 plugin: 2022/11/13 13:26:05 [INFO] RPC endpoint: Communicator ended with: 127
The script
#!/bin/bash
set -e
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt update
apt install -y curl
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt upgrade -y iptables
# The iptables-persistent must be installed in order to create the /etc/iptables/rules.v4 file
apt install -y nginx libzmq3-dev nodejs ipset iptables-persistent net-tools libre2-dev
npm install -g yarn
rm /etc/nginx/sites-enabled/default
The packer is working locally (also with the image) and I created a VM in GCP all of them are working, only in gitlab it fails.
I created a custom image of packer and it still failed for me on gitlab.
I will try to move it to my own runner but it will take a few days for me.
Would love if someone could help me figure it out.
Ok, I figured out the problem.
I curled some files and the token was not good so when it got to packer it failed because the files were not as expected.
I printing the 401 of the curl.
I am trying to build a docker file and I am getting this error
------
=> ERROR [internal] load metadata for docker.io/bitnami/minideb:stretch 2.5s
=> [auth] bitnami/minideb:pull token for registry-1.docker.io 0.0s
[internal] load metadata for docker.io/bitnami/minideb:stretch:
failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to authorize: rpc error: code = Unknown desc = failed to fetch oauth token: Get "https://auth.docker.io/token?scope=repository%3Abitnami%2Fminideb%3Apull&service=registry.docker.io": x509: certificate signed by unknown authority`
I just downloaded this file from git repo and tried to build it, but I am getting this above mentioned error.
I have tried so far:
docker login and docker pull hello-world/docker pull docker.io/bitnami/minideb:stretch works for me.
Tried restarting docker desktop, I am on a mac
Tried resetting to factory settings, and then restarting docker desktop, still no luck.
This is how I am building it:
docker build -f Dockerfile .
This is what is there in the docker file
FROM bitnami/minideb:stretch
RUN apt-get –no-install-recommends update
&& apt-get –no-install-recommends install -y openssh-client openssl libexpat1
&& sh /tmp/nso --system-install --non-interactive
the docker file is a really big one, so I cannot post the entire file here.
You have a few mistakes in your Dockerfile formatting.
You need to have a backslash at the end of each line before starting a new line with commands.
Please check the Dockerfile below:
FROM bitnami/minideb:stretch
RUN apt-get --no-install-recommends update \
&& apt-get install --no-install-recommends -y openssh-client \
openssl libexpat1 \
Note: I removed the last line of your Dockerfile because I don't understand what you want to do with it.
I am using a customized version of Ubuntu18.04 and I have a docker container where I tried to install a .deb package for the usage of a FLIR camera. To do so I downloaded from this website the file spinnaker-2.5.0.80-Ubuntu18.04-arm64-pkg.tar.gz, as suggested for Ubuntu18.04.
I followed those instructions to install everything, which basically means the following commands:
apt-get install libusb-1.0-0
tar xvfz spinnaker-2.5.0.80-Ubuntu18.04-arm64-pkg.tar.gz
cd spinnaker-2.5.0.80-arm64
./install_spinnaker_arm.sh
During this process the first errors arose, which I could fix through the installation of iputils-ping and lsb-release inside the docker container:
apt install iputils-ping
apt install -y lsb-release
However, afterwards another error arose:
/var/lib/dpkg/tmp.ci/preinst: 28 /var/lib/dpkg/tmp.ci/preinst: errmsg: not found
dpkg: error processing archive libspinnaker_2.5.0.80_arm64.deb (--install):
new libspinnaker package pre-installation script subprocess returned error exit status 127
ping: zone2.flir.net: No address associated with hostname
Errors were encountered while processing:
libspinnaker_2.5.0.80_arm64.deb
I though it is a nework issue inside the container but I do have internet connection, which I checked through:
ping www.google.com
Does anybody has a suggestion why I am not able to install the spinnaker SDK inside my docker container? Or has an explanation for me, what "no address associated with hostname" means? I am thankfull for every hint in any direction. Maybe it is an issue because I moved my docker data folder to an external SD card?
I wanted to install sql cmd in my docker image.
My dockerfile has these commands to install sqlcmd (centos 7 base image)
RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/msprod.repo
RUN yum remove mssql-tools unixODBC-utf16-devel
RUN yum install -y unixODBC-devel mssql-tools
Below is the docker build logs
Transaction test succeeded
Running transaction
Updating : libcom_err-1.42.9-17.el7.x86_64 1/14
Installing : unixODBC-2.3.7-1.rh.x86_64 2/14
Updating : libss-1.42.9-17.el7.x86_64 3/14
Installing : e2fsprogs-libs-1.42.9-17.el7.x86_64 4/14
Installing : e2fsprogs-1.42.9-17.el7.x86_64 5/14
Updating : 1:openssl-libs-1.0.2k-19.el7.x86_64 6/14
Installing : 1:make-3.82-24.el7.x86_64 7/14
Installing : 1:openssl-1.0.2k-19.el7.x86_64 8/14
/var/tmp/rpm-tmp.8S1dKq: line 17: /dev/tty: No such device or address
error: %pre(msodbcsql17-17.5.2.1-1.x86_64) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package msodbcsql17-17.5.2.1-1.x86_64
error: msodbcsql17-17.5.2.1-1.x86_64: install failed
/var/tmp/rpm-tmp.tObfQB: line 4: /dev/tty: No such device or address
error: %pre(mssql-tools-17.5.2.1-1.x86_64) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package mssql-tools-17.5.2.1-1.x86_64
Installing : unixODBC-devel-2.3.7-1.rh.x86_64 11/14
error: mssql-tools-17.5.2.1-1.x86_64: install failed
Cleanup : 1:openssl-libs-1.0.2k-8.el7.x86_64 12/14
Cleanup : libss-1.42.9-10.el7.x86_64 13/14
Cleanup : libcom_err-1.42.9-10.el7.x86_64 14/14
Verifying : libss-1.42.9-17.el7.x86_64 1/14
When i run this installation command manually inside the container's terminal using docker exec then it works fine.
If i run this command directly in a linux machine it works fine.
only when i am building a docker image using docker build i am getting the error /dev/tty: No such device or address
Try:
RUN ACCEPT_EULA=Y yum install -y unixODBC-devel mssql-tools