trying to do apt-get with docker, causing error 100 - node.js

I have a node.js application that I'm dockerizing, and it has a system dependency magicgraph. I cannot seem to be able to install it, I've tried apt-get in the Dockerfile like so RUN apt-get install --force-yes -y graphicsmagick and a few variations, but I keep getting the error The command '/bin/sh -c apt-get install --force-yes -y graphicsmagick' returned a non-zero code: 100.
Not sure how to fix this, is there a step tutorial on how to install gz files with the http://www.graphicsmagick.org/INSTALL-unix.html url maybe?

You need update list of available packages before install new one.
replace RUN apt-get install --force-yes -y graphicsmagick
to
RUN apt-get update && apt-get install -y graphicsmagick
if it don`t fix the issue show logs please

Related

i cant install Tweak Tool

i tried
apt-get install unity-tweak-tool-daily
E : unable locate a package
and im tried gnome tweak tool
gnome
add repo before apt-get install
sudo add-apt-repository ppa:freyja-dev/unity-tweak-tool-daily
sudo apt-get update && sudo apt-get install unity-tweak-tool
reference http://www.omgubuntu.co.uk/2013/03/unity-tweak-tool-is-now-available-in-raring

Allow Docker to cache RUN results

I have these commands in a Dockerfile:
RUN apt-get -y update #1
RUN apt-get -y install sudo #2
RUN sudo apt-get -y update #3
RUN sudo apt-get -y upgrade #4
RUN sudo apt-get install -y sqlite3 libsqlite3-dev #5
It looks as though Docker cannot cache line #3 or #4
Is there a way I can allow Docker to cache those results somehow? It's taking a minute or two to update/upgrade every time the image is built and I'd like to reduce this delay.
First thing You should avoid RUN apt-get upgrade or dist-upgrade, as many of the “essential” packages from the base images won’t upgrade inside an unprivileged container. If a package contained in the base image is out-of-date, you should contact its maintainers.
I think you need to run apt-get update only once within the Dockerfile & Always combine RUN apt-get update with apt-get install in the same RUN statement like
RUN apt-get update && apt-get install -y \
sudo \
sqlite3 \
libsqlite3-dev

Ubuntu 16.04 error with apt-get

Yesterday I updated Ubuntu from 14.04 to 16.04, when I tried to install git, I got this error:
The package linux-headers-4.4.0-65 needs to be reinstalled, but I
can't find an archive for it.
Then I tried to install another software, to the same error.
First you need to
sudo apt-get update
Then
sudo apt-get install git
I had a similar problem on Kali-Linux once. The thing that worked for me was:
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get update && sudo apt-get dist-upgrade

Installing programs via shell script; programs not found?

I'm writing a shell script so that I can quickly install dependencies on fresh virtual machines via OpenStack. I have written these dependencies in a script file but upon running, I receive the following error for each one:
E: unable to locate package ***
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: unable to locate package ****
and so on. I'm not sure what's going wrong, as I know the packages I've listed exist, and running sudo apt-get install *** (with the package names in the file) works as expected. My shell file looks like this:
#!/bin/bash
#shell script for installation on a VM
#i've never written a shell script before so bear with me please
apt-get update
apt-get --assume-yes install build-essential
apt-get --assume-yes install git
apt-get --assume-yes install make
apt-get --assume-yes install xclip
apt-get --assume-yes install python
apt-get --assume-yes install liblapack-dev
apt-get --assume-yes install libblas-dev
apt-get --assume-yes install libboost-dev
apt-get --assume-yes install libarmadillo-dev
and I'm running it as sudo bash freshinstallscript.sh.
I fixed the issue; it seemed to be related to line endings. To fix, I installed dos2unix and converted the shell file.

mysql-server:Depends: mysql-server-5.5 but it is not going to be installed

I am using ubuntu 14.04 on VirtualBox. I try install mysql-server using command
sudo apt-get install mysql-server, i always got error like below:
Some packages could be installed .This may mean that you have
request an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following packages have unmet dependencies:
mysqsl-server : Depends: mysql-server-5.5 but it is not going to be installed
E:Unable to correct problems, you have held broken packages.
and then i try use some command like below :
sudo apt-get update
sudo apt-get upgrade
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get purge mysql-server*
sudo apt-get install mysql-server
but it still error. Please help me!
Have you tried using
sudo apt-get install -f
This can repair broken packages or purge the installation.
If mysql-server is not installed with -f , you can try to install with normal way
sudo apt-get install mysql-server -y

Resources