Error when trying to install virtualbox-5.1 - linux

I'm trying to install Cuckoo (Ubuntu 64 bit) the commands that worked are:
$ sudo apt-get update
$ sudo apt-get install git -y
$ sudo apt-get install python python-pip python-dev libffi-dev libssl-dev -y
$ sudo apt-get install python-virtualenv python-setuptools -y
$ sudo apt-get install libjpeg-dev zlib1g-dev swig -y
$ sudo apt-get install mongodb -y
$ sudo apt-get install postgresql libpq-dev -y
$ echo deb http://http://download.virtualbox.org/virtualbox/debian xenial contrib | sudo tee -a /etc/apt/sources.list.d/virtualbox.list
$ wget -q https://https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
$ sudo apt-get update
$ sudo add-apt-repository "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib"
$ wget -q https://virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
and when I executed the following command:
$ sudo apt-get install virtualbox-5.1 -y
I got the following error:
Any help please on how to fix this error?

It would be better if you downloaded the .deb package from the website rather than using apt.

Related

Error installing containerd.io_1.6.9-1_amd64.deb on docker container

I'm trying to build a Docker container with the following commands in Dockerfile:
FROM python:3.6.2
RUN apt-get update && apt-get install make
RUN pip install -U pip setuptools wheel
RUN python -m pip install -r model-requirements.txt --python-version 3.6 --no-deps --target python6_pakages
# Installing docker-ce
RUN apt-get update
RUN apt install apt-transport-https ca-certificates curl software-properties-common -y --force-yes
RUN apt-get install -y gnupg --force-yes
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
RUN curl -O https://download.docker.com/linux/debian/dists/buster/pool/stable/amd64/containerd.io_1.6.9-1_amd64.deb
RUN apt install ./containerd.io_1.6.9-1_amd64.deb
RUN apt-cache policy docker-ce
RUN apt-cache search docker-ce
RUN apt install docker-ce -y
RUN apt-get install -y cron vim iputils-ping curl g++ unixodbc-dev gnupg supervisor
The problem us that when building process reaches the line RUN apt install ./containerd.io_1.6.9-1_amd64.deb I get errors like the following:
I have no idea why this is happening. I've double-checked the download URL and the package is successfully downloaded every time. Can you help me with this error?

Mongodb not starting up after installation

I installed mongodb 5.0.14 on ec2 instance
I followed this tutorial
sudo apt install -y software-properties-common gnupg apt-transport-https ca-certificates
wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
sudo apt update
sudo apt install -y mongodb-org
sudo systemctl start mongod
sudo systemctl status mongod
But I get this error on the picture below

Strange errors and tried reinstalling open cv and face_recognition and still get errors tried all kinds from this site and nothing has worked

I got 2 errors while trying to install pip3 install face_recognition command failed building wheel for dlib and failed building wheel for face-recognition models on linux
Failed building wheel for face-recognition-models
Failed building wheel for dlib
Then it said it was successful face-recognotion-1 instead of without the 1 and scripts using module face_recognition still fails! How do I purge all opencv and face_recog and start again from scratch?
import face_recognition
The strangest error I'm not even trying to run that file as you can see but its referring to it like it depends onit
./test.py
Traceback (most recent call last):
File "./test.py", line 3, in <module>
import face_recognition
File "/home/jay/Documents/Scripts/PYTHON/Face_Recognition/Newest_2021/face_recognition_examples/face_recognition.py", line 14, in <module>
face_recognizer = cv2.face.LBPHFaceRecognizer_create()
NameError: name 'cv2' is not defined
I need to purge it all and start again without reinstalling the os how do U guarantee a fix for this issue please?
I'm on linux mint using python3
Any ideas?
I want to purge everything to do with opencv cmake pip face_recognition completely so it all can be done from the start without wiping the whole os.
Solved it with
#!/bin/bash
# (c)J~Net 2021
# jnet.sytes.net
#
# Use sudo or give exec perms! sudo chmod +x *.sh
# sudo -H ./reinstall.sh
# USE # YOUR OWN RISK! I ACCEPT NO LIABILITY FOR ANY DAMAGE CAUSED TO YOUR OS!
#
echo "Uninstalling Face Recog & Dlib"
echo ""
sudo pip3 uninstall face_recognition -y
sudo pip3 uninstall dlib -y
sudo pip2 uninstall face_recognition -y
sudo pip2 uninstall dlib -y
sudo pip uninstall face_recognition -y
sudo pip uninstall dlib -y
sudo apt-get --purge autoremove face_recognition
sudo apt-get --purge autoremove opencv
sudo apt-get --purge autoremove cmake
sudo apt-get --purge autoremove dlib
sudo apt-get --purge autoremove python-opencv
#
echo "Now Reinstalling For Python3 for use with OpenCV By J~Net 2021"
echo "Please, wait, this will take some time do not use computer for anything while its working!"
echo ""
sudo apt install -y cmake
#
git clone https://github.com/davisking/dlib.git
#
cd dlib
mkdir build; cd build; cmake ..; cmake --build .
#
cd ..
python3 setup.py install
pip3 install face_recognition
#
sudo apt install -y build-essential cmake pkg-config
sudo apt install -y libjpeg8-dev libtiff5-dev libjasper-dev libpng12-dev
sudo apt install -y libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt install -y libxvidcore-dev libx264-dev
sudo apt install -y libgtk-3-dev
sudo apt install -y libatlas-base-dev gfortran
sudo apt install -y python2.7-dev python3.5-dev
sudo apt install -y libx11-dev
sudo apt-get -y install libopencv-dev build-essential cmake git libgtk2.0-dev pkg-config python-dev python-numpy libdc1394-22 libdc1394-22-dev libjpeg-dev libpng12-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev libtbb-dev libqt4-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils unzip
#
mkdir opencv
cd opencv
wget https://github.com/Itseez/opencv/archive/3.2.0.zip -O opencv-3.2.0.zip
unzip opencv-3.2.0.zip
cd opencv-3.2.0
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..
make -j $(nproc)
sudo make install
sudo /bin/bash -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig
echo ""
echo "Setup Complete!"
echo ""
echo ""
echo "Reinstall Complete!"
echo ""

Installing Azure CLI in Dockerfile can't locate package azure-cli

I'm trying to write a dockerfile that will install Azure CLI so that I can run CLI commands in bitbucket pipelines.
However the installation of the CLI always fails:
E: Unable to locate package azure-cli
The command '/bin/sh -c apt-get install azure-cli' returned a non-zero code: 100
Here is my dockerfile
FROM atlassian/default-image:latest
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
RUN chmod +x ./kubectl
RUN mv ./kubectl /usr/local/bin/kubectl
RUN apt-get update
RUN apt-get install -y libssl-dev libffi-dev
RUN apt-get install -y python-dev
RUN apt-get install apt-transport-https lsb-release software-properties-common -y
ENV AZ_REPO $(lsb_release -cs)
RUN echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | tee /etc/apt/sources.list.d/azure-cli.list
RUN apt-key --keyring /etc/apt/trusted.gpg.d/Microsoft.gpg adv \
--keyserver packages.microsoft.com \
--recv-keys BC528686B50D79E339D3721CEB3E94ADBE1229CF
RUN apt-get install azure-cli
CMD ["/bin/bash"]
you need to do apt-get update after importing new package feed to get packages from that feed.

I'm new to Ubuntu and I can't seem to get this Curl command to work. How can I install nodejs 7.x on Ubuntu 16.04?

sudo apt-get update&&sudo apt-get dist-upgrade
sudo apt-get install curl
sudo apt-get install python-software-properties
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
and the curl command fails when trying to enter, says "bash: -d: command error
Solved it, I dunno why but I had to type:
sudo apt-get install -y nodejs
sudo apt-get purge nodejs npm
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs
and that seemed to actually install 4.2, remove it, then install 7.x

Resources