small issue with ddev - brew - docker - ddev

just set up a dev laptop but installing ddev has been problematic. followed instructions from docs.docker.com, ddev.readthedocs.com, and Mike Anello's book for DDEV LOCAL.
An unusual and undocumented bit of installation is when I tried to run brew initially, my Ubuntu 18.04 complained to me to install linuxbrew-wrapper so I did. Then the brew worked properly.
The situation is this: I cannot run ddev unless the docker container is stopped. Looking in /bin and /Cellar shows most of the executables have myname:docker as owner/group but ddev, hello, patchelf are myname:myname owner/group.
Should I chown those files to myname:docker owner/group to be able to run them while the container is live?
or
Am I supposed to shut off the container for running ddev?
Solution (ymmv)
Part 1
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo docker run hello-world
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose
docker-compose --version
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
Part 2
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
sudo apt-get install build-essential
sudo apt-get -o Dpkg::Options::="--force-overwrite" install --fix-broken
echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >>~/.profile
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >>~/.bashrc
source .bashrc
Part 3
brew
brew install gcc
brew tap drud/ddev && brew install ddev
mkcert --install

Related

Repository 'http://security.debian.org/debian-security buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'

Some of my GitHub Actions workflows started recently to return this error when installing Chromedriver:
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [122 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Reading package lists...
E: Repository 'http://security.debian.org/debian-security buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://deb.debian.org/debian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://deb.debian.org/debian buster-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'
Error: Process completed with exit code 100.
Here is my step implementation:
jobs:
build:
runs-on: ubuntu-latest
container:
image: docker://guillaumefalourd/ritchiecli:py-3.8
steps:
- name: Install Chrome Driver
run: |
sudo apt-get update
sudo apt-get install -y unzip xvfb libxi6 libgconf-2-4 gnupg2
sudo curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add
sudo echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
sudo apt-get -y update
sudo apt-get -y install google-chrome-stable
wget -N https://chromedriver.storage.googleapis.com/89.0.4389.23/chromedriver_linux64.zip -P ~/
unzip ~/chromedriver_linux64.zip -d ~/
rm ~/chromedriver_linux64.zip
sudo mv -f ~/chromedriver /usr/local/bin/chromedriver
sudo chown root:root /usr/local/bin/chromedriver
sudo chmod 0755 /usr/local/bin/chromedriver
Docker Image Implementation: docker://guillaumefalourd/ritchiecli:py-3.8
What I tried
I read from here and here that adding sudo apt-get --allow-releaseinfo-change update or sudo apt-get dist-upgrade could resolve the problem, but even adding those to my workflow didn't resolve it.
I tried using this action setup-chromedriver but it returned the same error when following the documentation:
steps:
- uses: actions/checkout#v2
- uses: nanasess/setup-chromedriver#master
with:
# Optional: do not specify to match Chrome's version
chromedriver-version: '88.0.4324.96'
- run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
As it seems to be related to Debian 10 (Buster) (?) I also tried to use another Ubuntu runner version as a runner (ubuntu-18.04 instead of ubuntu-latest), but nothing changed, same error.
How can I resolve this issue?
Answer
I observed afterwards that the problem was happening at the first command : sudo apt-get update (and I was adding the other command after...).
Substituting it for sudo apt-get --allow-releaseinfo-change update resolved my problem.
Therefore the answer was not to add the sudo apt-get --allow-releaseinfo-change update to the step executed commands, but substituting the sudo apt-get update command for it.
jobs:
build:
runs-on: ubuntu-latest
container:
image: docker://guillaumefalourd/ritchiecli:py-3.8
steps:
- name: Install Chrome Driver
run: |
sudo apt-get --allow-releaseinfo-change update
sudo apt-get install -y unzip xvfb libxi6 libgconf-2-4 gnupg2
sudo curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add
sudo echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
sudo apt-get -y update
sudo apt-get -y install google-chrome-stable
wget -N https://chromedriver.storage.googleapis.com/89.0.4389.23/chromedriver_linux64.zip -P ~/
unzip ~/chromedriver_linux64.zip -d ~/
rm ~/chromedriver_linux64.zip
sudo mv -f ~/chromedriver /usr/local/bin/chromedriver
sudo chown root:root /usr/local/bin/chromedriver
sudo chmod 0755 /usr/local/bin/chromedriver
I know you tried it with
apt-get --allow-releaseinfo-change update
but it worked for me.
This is my command in the dockerfile:
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 --allow-releaseinfo-change update \
&& apt-get install -y google-chrome-unstable \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
not required: rm -rf /var/lib/apt/lists/*
FWIW, you may reduce your risk in using this option (--allow-releaseinfo-change) by adding specialist options to limit the fields you permit to bypass apt-secure. From man apt-get:
Specialist options (--allow-releaseinfo-change-field) exist to allow changes only for certain fields like origin, label, codename, suite, version and defaultpin. See also apt_preferences(5).
For example, in the current bugaboo created by the delayed release of bullseye between the Debian and its derivative RPi OS, the specialist option would be suite. This due to the fact that the suite label in buster has been changed from stable to oldstable:
$ sudo apt-get --allow-releaseinfo-change-suite update

Installing Passenger & Nginx using Vagrant shell script

This is my first post to SO so I hope I'm asking this correctly.
I wrote a shell script to automate the installation of Passenger & Nginx (along with some other components) without any user input on a Vagrant VM running Ubuntu 14.04. It works fine using the following:
echo "****** Adding Passenger & Nginx Repo ******"
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7
sudo apt-get install apt-transport-https ca-certificates -y
echo "deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main" | sudo tee /etc/apt/sources.list.d/passenger.list
sudo chown root: /etc/apt/sources.list.d/passenger.list
sudo chmod 600 /etc/apt/sources.list.d/passenger.list
sudo apt-get update
echo "****** Installing Passenger & Nginx ******"
sudo apt-get install nginx-extras passenger -y
Now I want to do the same thing for a Vagrant VM running CentOS 6.4. I followed the directions for CentOS found on the Phusion Passenger site but I can't seem to get it working properly. When I do the following, the output from the shell script says "No package passenger available.":
echo "****** Adding Passenger & Nginx Repo ******"
sudo yum install epel-release pygpgme curl -y
sudo 'echo "curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo"'
sudo chown root: /etc/yum.repos.d/passenger.repo
sudo chmod 600 /etc/yum.repos.d/passenger.repo
sudo yum update
echo "****** Installing Passenger & Nginx ******"
sudo yum install nginx passenger -y
Looking in the /etc/yum.repos.d directory after the script is run, there is no passenger.repo listed, so it looks like for whatever reason curl is not downloading the repo file. However, if I manually type the commands in my terminal command line after the script finishes it will pull down the repo and run.
I'm probably doing something stupid here, but I'm rather new to shell scripting and can't seem to figure out where the problem is.
Thanks for any help you can give me.
sudo 'echo "curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo"'
That is wrong and is not what the manual instructed. It should be:
sudo curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo

Error in build from Dockerfile for Ubuntu image with Mono installed

I have the following docker file that I am attempting to use to build a Ubuntu image with mono.
FROM ubuntu:14.04
MAINTAINER John Smith <John.Smith#gmail.com>
RUN sudo apt-get update
RUN sudo /bin/bash -l -c apt-get install wget
RUN sudo /bin/bash -l -c apt-get http://download.mono-project.com/repo/xamarin.gpg
RUN sudo apt-key add xamarin.gpg
RUN sudo echo "deb http://download.mono-project.com/repo/debian wheezy main" > /etc/apt/sources.list.d/mono-xamarin.list
RUN sudo apt-get update
RUN sudo apt-get install mono-complete
When I run the following docker build command...
docker build -t="test/mono" .
It fails building and gives the following errors message:
gpg:can't open 'xamaring.gpg': No such file or directory.
2015/05/27 16:11:01 The command [/bin/bash -c sudo apt-key add xamarin.gpg] returned a non-zero code: 2
Anything obviously wrong sticking out?
It looks like you forgot to use wget instead of apt-get after you installed wget, so 'xamaring.gpg' has not been downloaded and that's why it can't be found.
You need this:
/bin/bash -l -c "wget http://download.mono-project.com/repo/xamarin.gpg"
The is an example of this in docker's website:
Dockerizing MongoDB

Unable to locate package google-chrome-stable ubuntu12 on openstack

I'm running a script on my ubuntu on openstack (env bash) which is trying to install the latest stable chrome browser:
sudo apt-get update
sudo apt-get -y install openjdk-7-jre google-chrome-stable
But I'm getting --> Unable to locate package google-chrome-stable ubuntu
I tried the following additions but they didn't help:
# trying universe repo
sudo apt-get -y install libgconf2-4 libnss3-1d libxss1
sudo apt-get update
# trying something for openstack
sudo apt-get install ubuntu-cloud-keyring
sudo apt-get update
Will be happy to hear more suggestions.
Setup key with:
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
Setup repository with:
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install google-chrome-stable
(https://www.ubuntuupdates.org/ppa/google_chrome)
As written in the comment above, The fix is adding:
deb http://dl.google.com/linux/chrome/deb/ stable main to the source file:
sudo sh -c "echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' >> /etc/apt/sources.list"
For information chrome is not available on ARM. That is why nothing worked for me here.
First you need to add key:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A040830F7FAC5991
and then you could do:
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google.list
apt-get update && apt-get install -y google-chrome-stable
Without key you are installing unsigned package and because of that you might get problems late.
The existing accepted answer is close but fails to use HTTPS:
Setup key with:
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
Setup repository with:
sudo sh -c 'echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install google-chrome-stable
(https://www.ubuntuupdates.org/ppa/google_chrome)
If nothing works, try:
$ touch /etc/apt/sources.list

installing ghostscript with vagrant

I would like to install ghostscript when creating my vagrant environment but i have no idea how to achieve this. My provisioning script looks as following:
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get install -y python-software-properties
sudo add-apt-repository -y ppa:ondrej/php5
sudo apt-get update
sudo apt-get install -y wget php5 apache2
# Apache stuff
sudo a2enmod rewrite
rm -rf /var/www
ln -fs /vagrant /var/www
sudo service apache2 restart
Inside your shell provisioning script you must define the following commands
wget http://downloads.ghostscript.com/public/ghostscript-9.10.tar.bz2
tar xjf ghostscript-9.10.tar.bz2
cd ghostscript-9.10
rm -rf zlib && ./configure --prefix=/usr --disable-compile-inits \ --enable-dynamic --with-system-libtiff && make
make so
su root
make install
gs -v
What this basically does is:
download the package
extract the contents
compiles ghostscript
installs ghostscript
checks if it installed correctly
Above explanation has to send you on it's way to install it

Resources