I've got a docker container and i'm trying to install python. I'm using yum for it:
yum install -y https://centos7.iuscommunity.org/ius-release.rpm
=> NOTE that I using CentOS-8. I found other install tutorials online but they were with dnf which I don't have.
yum update
=> this returns a screen where you get the all-known prompt: Total download size: 24 M
Is this ok [y/N]:
but docker doesn't let me type anything here, he quit automatically leaving Operation aborted. instead of y or n. How can i confirm my installation?
I've found that when you run
yum update -y
it automatically says y to all the questions asked, so i could install it this way.
Related
I am trying to compile Mendel Linux on Ubuntu 20.04 as per:
https://coral.googlesource.com/docs/+/refs/heads/master/GettingStarted.md
I receive the following:
WARNING: The following packages cannot be authenticated!
libedgetpu1-std python3-tflite-runtime python3-pycoral
E: There were unauthenticated packages and -y was used without --allow-unauthenticated
make: *** [/rootdir/build/rootfs.mk:153: /rootdir/out/target/product/imx8m_phanbell/obj/ROOTFS/rootfs_arm64.patched.img] Error 100
I tried installing the three packages as per:
https://coral.ai/software/#debian-packages
I also tried :
$ sudo apt-key update
$ sudo apt-get update
$ sudo apt-get upgrade
but I still get the above warning and error.
How can I authenticate the above packages?
Thanks.
I face the same problem recent.
Finally, I solve it a few minutes ago.
The Key is to use root user to run the whole tutorial.
$sudo -i #change the user to root
I think the problem is about Docker user.
$sudo apt-get install docker.io
$sudo adduser $USER docker
Before the step "Build the tree" in the tutorial, I use standard user to run the command.
So $USER will be standard user
In the step Build the tree, I face some permission problem.
So I change to root to build the kernel.
The $USER should be root.
I think different $USER cause this problem.
Hope I can heard some good news.
Thank you for taking the time to respond.
I was trying to compile as a normal user as opposed to root. I created a Linux guest on another computer and followed my previous steps (as a normal user). Everything compiled there as it should. I haven't figured out yet why I can't compile using my first setup but I will update if I find a solution.
I hope you're all well!
This is my first question ever on stack overflow, so if i'm missing anything, just tell me and it'll be my pleasure to update my question.
So, to summarize my problem, I am trying to install Docker-ce on an Ubuntu 18.04 VM by following the official steps at Docker-Engine Installation and I am getting the error "Hash Sum Mismatch" when running the command "sudo apt-get install docker-ce docker-ce-cli containerd.io".
I went through the official steps a few times and I've tried the following things so far :
1) The following commands, followed by the official installation steps
apt-get clean
rm -rf /var/lib/apt/lists/*
apt-get clean
apt-get update
apt-get upgrade
2) Creation of a file with the following lines, placed at "/etc/apt/apt.conf.d/99fixbadproxy", followed by the official installation steps
Acquire::http::Pipeline-Depth 0;
Acquire::http::No-Cache true;
Acquire::BrokenProxy true;
3) Installation of other versions of docker-ce with the following commands
sudo apt-get install docker-ce 5:19.03.8~3-0~ubuntu-bionic
sudo apt-get install docker-ce 5:19.03.6~3-0~ubuntu-bionic
sudo apt-get install docker-ce 5:18.09.9~3-0~ubuntu-bionic
4) I tried installing different repositories (i think they're called repositories) by adding "nightly" or "test" or both after the word "stable" of the following command
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
And I think that is pretty much it. I did tried other things but unfortunately i don't remember them because I've been working on this issue for quite some time now.
I did not try on a fresh new installation of Ubuntu 18.04 though.
If I'm missing anything in my question, please let me know!
Take care everybody!
EXPLANATION and Solution: Quick Fix
This issue is caused by the Windows Hypervisor Platform. This issue cannot be resolved for now (asfar as I know).
A partial fix is at hand though. And I say"partial" because it involves disabling the platform (also known as"Hyper-V") which will probably break other virtualization solutions you have installed since this is enabled manually. Anyway, here's how to disable it and get your VM running again,
Shut down the Virtual Machine.
Press Windows logo key + X, then hit A to run Command Prompt(powershell) as administrator.
Type
bcdedit /set hypervisorlaunchtype off
When you see"The operation completed succesfully", reboot your windows. After reboot, boot your VM and update/upgrade.
For anyone still having issues with this, I managed to get it working by disabling HyperV (as most people have already suggested). However, on my setup, disabling HyperV using the mentioned approaches didnt actually disable HyperV since my windows machine used HyperV for both CredentialGuard and Secure Boot, both of which needed to be disabled before HyperV was actually fully disabled
If running systeminfo.exe in an elevated terminal shows A hypervisor has been detected. Features required for Hyper-V will not be displayed, then HyperV is not fully disabled. Disabling credential guard and secure boot coupled with a few restarts (after running all the commands to disable HyperV that have already been mentioned) solved all issues for me.
Just for reference, if HyperV is fully disabled, you should see
Hyper-V Requirements: VM Monitor Mode Extensions: Yes
Virtualization Enabled In Firmware: Yes
Second Level Address Translation: Yes
Data Execution Prevention Available: Yes
when running systeminfo.exe
I'm currently working out a Dockerfile. So I am trying to build out a Centos 7.6 base image and I get a failure when I try to use any yum packages. I'm not sure what the cause of this is.
I've already attempted to make the user root to see if that makes a difference but it doesn't help the situation. I've also done a docker pull centos to recieve the latest version of centos.
I simplified the code and still the same error.
FROM centos
ARG MONGO-RAILS-VERSION="0.0"
RUN yum install vim
# curl -L get.rvm.io | bash -s stable \
# rvm install 2.3.1 \
# rvm use 2.3.1 --default \
# gem install rails
I get an error that looks something like this
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: base/7/x86_64
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=container error was
14: curl#7 - "Failed to connect to 2001:1b48:203::4:10: Network is unreachable"
The command '/bin/sh -c yum install vim' returned a non-zero code: 1
You may want to have a look for Set build-time variables (--build-arg):
$ docker build --build-arg HTTP_PROXY=http://10.20.30.2:1234 --build-arg FTP_PROXY=http://40.50.60.5:4567 .
I want to install package foo version 1234 in a docker container. I prefer this to the latest version, as it will always work the same way.
So my Dockerfile has this:
RUN apt-get update && apt-get install -y foo=1234
But the base image is mongodb:4.0.2, which is layered on Ubuntu xenial.
When I build the image, the apt install fails because it cannot find that version. I think xenial doesn't support that version.
So how do I find the latest supported version of a package foo on xenial? If I run apt policy foo it shows me the latest for the ubuntu I'm using (bionic), not for xenial.
If the package at stake is, say, rlwrap, you could just take a look at the webpage https://packages.ubuntu.com/xenial/rlwrap
But if you want a proper way to get this version info programatically, you can rely on the Launchpad API, which comes with an official API client implemented as a Python library.
Otherwise, you can directly query the API with tools such as curl and jq (to parse the retrieved JSON data):
$ curl -fsSL "https://api.launchpad.net/1.0/ubuntu/+archive/primary?ws.op=getPublishedSources&source_name=rlwrap&exact_match=true&distro_series=https://api.launchpad.net/1.0/ubuntu/xenial" \
| jq --raw-output ".entries | .[0] | .source_package_version"
→ 0.41-1build1
As mentioned in this Askubuntu question, a similar API exists for Debian as well.
When it comes to install Docker on centos, i found 2 different ways to do it.
The first one is : yum install docker-engine
The second one is: yum install docker-io
And in case i installed docker using the first one, it i continue with the second one the error appeared, like this:
Error: docker-engine conflicts with docker-1.8.2-10.el7.centos.x86_64
Error: docker-engine-selinux conflicts with docker-selinux-1.8.2-10.el7.centos.x86_64
So anyone can tell me what's the difference between them?
This dates back from June 2015, when Docker announced "New Apt and Yum Repos"
That is when new packages (like the one for CentOS) were named docker-engine (initially to replace lxc-docker*)