I am running ubuntu on my window 10 through VMware. Because the Udacity course needs uWebSockets to run the simulator.
here is the step the class given to install it:
run chmod a+x install-linux.sh
this is the install-linux.sh file in the same directory
#!/bin/bash
source /etc/os-release || echo 'Warning: /etc/os-release was not found'
if [[ " $ID_LIKE " == *' archlinux '* ]]; then
sudo pacman -S git libuv openssl gcc cmake make
else
if [[ ! " $ID_LIKE " == *' debian '* ]]; then
echo 'Warning: unidentified Linux distribution, assuming Debian-like'
fi
sudo apt-get update
sudo apt-get install git libuv1-dev libssl-dev gcc g++ cmake make
fi
git clone https://github.com/uWebSockets/uWebSockets
cd uWebSockets
git checkout e94b6e1
mkdir build
cd build
cmake ..
make
sudo make install
cd ../..
sudo ln -s /usr/lib64/libuWS.so /usr/lib/libuWS.so
sudo rm -r uWebSockets
But when I try the command in the terminal, nothing happened.
Is anybody can provide some help?
All chmod a+x install-linux.sh does is change the file permissions of install-linux.sh so that it is executable. So I wouldn't expect to see anything in the terminal.
I expect that after changing the file permissions that you are supposed to run the script like this
./install-linux.sh
Related
Rather than necro-post on a two-year old thread, I decided to create a new question.
I want add brew (homebrew) to a Docker container, but I get a brew: not found error.
The suggested solution in that previous article doesn't seem to work. This new Dockerfile...
FROM rust:1.63.0-buster
WORKDIR app
RUN apt-get update && \
apt-get install -y -q --allow-unauthenticated \
git \
sudo
RUN useradd -m -s /bin/zsh linuxbrew && \
usermod -aG sudo linuxbrew && \
mkdir -p /home/linuxbrew/.linuxbrew && \
chown -R linuxbrew: /home/linuxbrew/.linuxbrew
USER linuxbrew
RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
USER root
RUN chown -R $CONTAINER_USER: /home/linuxbrew/.linuxbrew
RUN brew install hello
gives this error... What am I missing? Thanks.
=> ERROR [6/6] RUN brew install hello 0.2s
------
> [6/6] RUN brew install hello:
#9 0.181 /bin/sh: 1: brew: not found
------
executor failed running [/bin/sh -c brew install hello]: exit code: 127
This Dockerfile installs brew in /home/linuxbrew/.linuxbrew/bin/brew. Including that directory in the path (with the ENV command) does the trick.
...
ENV PATH="/home/linuxbrew/.linuxbrew/bin:${PATH}"
RUN brew install hello
I have some troubles using a docker container in order to cross compile a program with visual studio 2019.
Here is my docker file
FROM ubuntu:16.04
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -sf /bin/true /sbin/initctl
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get -y upgrade
# install 32 bit libraries required for gnuarm tools from
# https://launchpad.net/gcc-arm-embedded & a few minimalistic tools with ssh server
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get -y install \
libc6:i386 libncurses5:i386 libstdc++6:i386 libpython2.7:i386 vim \
make git unzip \
sudo curl less tree openssh-server
# clean cache
RUN apt-get clean
RUN mkdir -p /var/run/sshd
COPY *.tgz /tmp/
RUN cd /tmp && \
tar zxvf gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf_5.3_sub1.0.3.tgz -C /opt && \
tar zxvf Compiler_gcc-linaro-5.3_patch_1.2.2.tgz && \
cd Compiler_gcc-linaro-5.3_patch && \
bash ./install-owa4x-comp-PATCH-1.2.2.sh && \
cd / && \
rm -rf /tmp/*
ENV PATH="${PATH}:/opt/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin"
RUN useradd -G sudo --create-home --shell /bin/bash --user-group myuser
RUN echo "myuser:myuser_pwd" | chpasswd
RUN echo "PATH=$PATH:/opt/gcc-linaro-5.3-2016.02-x86_64_arm-linuxgnueabihf/bin" >> /etc/profile
CMD ["source /etc/profile"]
CMD ["/usr/sbin/sshd", "-D"]
EXPOSE 22
ENV WORKSPACE /home/myuser/workspace
VOLUME ${WORKSPACE}
Here is how a create my image
docker build --tag cc_arm .
myuser#ubuntu:~/Documents/share$ docker run -d -p 5000:22 -v /home/myuser/Documents/share:/home/myuser/workspace cc_arm
But when I open a shell and type
which g++
which gcc
I have nothing. I've also tried to set the path manually
export C="/opt/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc"
export CXX="/opt/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++"
echo 'export CC=/opt/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc' >> ~/.bashrc
echo 'export CXX=/opt/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++' >> ~/.bashrc
But it doesn't work.
I think my environnement is okay because I can cross compile a simple programm using a g++ from the packages (locate in /usr/bin/g++)
sudo apt install -y openssh-server build-essential gdb rsync ninja-build zip
Thanks in advance.
Finally, I've changed my project in Visual Studio 2019 to a CMake project.
I've created a CMake file in the shared volume of my container.
SET(CMAKE_C_COMPILER /opt/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER /opt/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++)
SET(CMAKE_STRIP /opt/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-strip)
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_PROCESSOR arm)
SET(CMAKE_SYSTEM_VERSION 1)
And in Visual Studio 2019, I've changed the launch.vs.json
"configurations": [
{
"type": "cppgdb",
"name": "CMakeProject6 (CMakeProject6\\CMakeProject6)",
"project": "CMakeLists.txt",
"projectTarget": "CMakeProject6 (CMakeProject6\\CMakeProject6)",
"debuggerConfiguration": "gdb",
"args": [],
"env": {},
"remoteMachineName": "10.0.0.1 (username=root, port=22, authentication=Password)",
"deploy": [
{
"sourceMachine": "192.168.72.144 (username=root, port=5000, authentication=Password)", // DOCKER CONTAINER
"targetMachine": "10.0.0.1 (username=root, port=22, authentication=Password)", // REMOTE MACHINE
"deploymentType": "RemoteRemote"
}
]
}
I would like to run a conda command with singularity.
The command is:
singularity exec ~/dockerimage.sif conda
It yields an error:
/.singularity.d/actions/exec: 9: exec: conda: Permission denied
Here is my dockerfile:
FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y apt-utils wget=1.20.3-1ubuntu1 python3.8=3.8.2-1ubuntu1.2 python3-pip=20.0.2-5ubuntu1 python3-yaml=5.3.1-1 git=1:2.25.1-1ubuntu3
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.8.3-Linux-x86_64.sh && chmod +x Miniconda3-py38_4.8.3-Linux-x86_64.sh && ./Miniconda3-py38_4.8.3-Linux-x86_64.sh -b && cp /root/miniconda3/bin/conda /usr/bin/conda
RUN wget https://data.qiime2.org/distro/core/qiime2-2020.8-py36-linux-conda.yml && conda env create -n qiime2-2020.8 --file qiime2-2020.8-py36-linux-conda.yml && conda install -y -n qiime2-2020.8 -c conda-forge -c bioconda -c qiime2 -c defaults q2cli q2template q2-types q2-feature-table q2-metadata vsearch snakemake
What should I add to the Dockerfile? How would it work?
You're installing with conda default settings, which puts it in the home of the current user. That user is root. Singularity runs as your current user, so unless you're running as root the conda files will not be available.
modify your conda install command to set the install prefix: -p /opt/conda (or some other arbitrary location)
make sure that any user will be able to access the files installed with conda: chmod -R o+rX /opt/conda
update PATH to include conda: export PATH="$PATH:/opt/conda/bin"
when running your image make sure your environment variables are not overriding those in the container: singularity exec --cleanenv ~/dockerimage.sif conda
I'm trying to use shadowsocksR in my ubuntu 16 .
sudo apt-get install git
git clone -b manyuser https://github.com/shadowsocksr-backup/shadowsocksr.git
cd shadowsocksr/shadowsocks
python local.py -s server_ip -p server_port -k password -m chacha20-ietf -o tls1.2_ticket_auth
then he said " libsodium not found" so I install libsodium
download the LATEST.tar.gz from https://download.libsodium.org/libsodium/releases/
tar -zxf LATEST.tar.gz
cd libsodium-stable
./configure
make && make check
sudo make install
```
but this time
python local.py -s server_ip -p server_port -k password -m chacha20-ietf -o tls1.2_ticket_auth
He said OSError: libsodium.so.23: cannot open shared object file: No such file or directory
thankyou for your help
You need to install libsodium-dev
Try running "apt-get install libsodium-dev"
If you've compiled libsodium, make sure libsodium is in the linker cache:
ldconfig -p | grep libsodium
If there is no output, chances are that the linker cache is not updated in time.
You can update the cache by:
sudo ldconfig
I'm currently install the goczmq (https://github.com/zeromq/goczmq) on golang:1.6.2-alpine docker container, as following:
wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.10.tar.gz
wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.10.tar.gz.sig
wget https://download.libsodium.org/jedi.gpg.asc
gpg --import jedi.gpg.asc
gpg --verify libsodium-1.0.10.tar.gz.sig libsodium-1.0.10.tar.gz
tar zxvf libsodium-1.0.10.tar.gz
cd libsodium-1.010.
./configure; make check
sudo make install
sudo ldconfig
The process failed on ldconfig, there seems be a command ldconfig, but I don't think it is actually functional. Any insights? Thank you in advance.
Alpine's version of ldconfig requires you to specify the target folder or library as an argument. Note that alpine has no /etc/ld.so.conf file, nor does it recognize one if you create it.
Example with no target path:
$ docker run -ti alpine sh -c "ldconfig; echo \$?"
1
Example with target path:
$ docker run -ti alpine sh -c "ldconfig /; echo \$?"
0
However, even with that there are frequently linking errors. Others suggest:
Manual symbolic links
Installing glibc into your container.