I am trying to install OpenStack on CentOS 7.3.1611 with packstack as below.
$ sudo yum install -y https://www.rdoproject.org/repos/rdo-release.rpm
$ sudo yum update -y
$ sudo yum install -y openstack-packstack
$ sudo packstack --allinone
But it doesn't work due to the error as below.
2017-03-18 15:35:26::INFO::shell::94::root:: [localhost] Executing script:
.......
yum update -y puppet hiera openssh-clients tar nc puppet-aodh puppet-apache puppet-barbican puppet-cassandra puppet-ceilometer puppet-ceph puppet-certmonger puppet-cinder puppet-collectd puppet-concat puppet-congress puppet-contrail puppet-corosync puppet-datacat puppet-ec2api puppet-elasticsearch puppet-firewall puppet-fluentd puppet-git puppet-glance puppet-gnocchi puppet-haproxy puppet-heat puppet-horizon puppet-inifile puppet-ipaclient puppet-ironic puppet-java puppet-kafka puppet-keystone puppet-kibana3 puppet-kmod puppet-manila puppet-memcached puppet-midonet puppet-mistral puppet-module-data puppet-keepalived puppet-mongodb puppet-mysql puppet-n1k-vsm puppet-neutron puppet-nova puppet-nssdb puppet-ntp puppet-opendaylight puppet-openstack_extras puppet-openstacklib puppet-oslo puppet-ovn puppet-pacemaker puppet-panko puppet-rabbitmq puppet-redis puppet-remote puppet-rsync puppet-sahara puppet-sensu puppet-snmp puppet-ssh puppet-staging puppet-stdlib puppet-swift puppet-sysctl puppet-systemd puppet-tacker puppet-tempest puppet-timezone puppet-tomcat puppet-tripleo puppet-trove puppet-uchiwa puppet-vcsrepo puppet-vlan puppet-vswitch puppet-xinetd puppet-zaqar puppet-zookeeper puppet >= 2.7.0
.....
rpm -q --whatprovides puppet-vcsrepo
rpm -q --whatprovides puppet-vlan
rpm -q --whatprovides puppet-vswitch
rpm -q --whatprovides puppet-xinetd
rpm -q --whatprovides puppet-zaqar
rpm -q --whatprovides puppet-zookeeper
rpm -q --whatprovides puppet
rpm -q --whatprovides >=
rpm -q --whatprovides 2.7.0
.........
rpm: no arguments given for query
++ t
++ exit 1
This seems to be happened by the wrong yum command which is generated by packstack.
Have anyone seen same error ?
Related
I want to build a singularity container for the text-package in R (which is using reticulate to access python). The singularity container builds, and the text-package is installed, and can run textEmbed("hello") as part of the installation process.
But when I start the singularity container and then run: Rscript -e 'text::textEmbed("hello")'. I get an error reading:
Error: Python shared library not found, Python bindings not loaded.
Use reticulate::install_miniconda() if you'd like to install a Miniconda Python environment.
But I have confirmation that it has been installed and that textEmbed("hello") worked in the end of the installation process. Below are the file I'm using to build the singularity container.
Bootstrap: docker
From: ubuntu:20.04
%environment
export LANG=C.UTF-8 LC_ALL=C.UTF-8
export XDG_RUNTIME_DIR=/tmp/.run_$(uuidgen)
%post
# Install
apt-get -y update
export R_VERSION=4.1.3
echo "export R_VERSION=${R_VERSION}" >> $SINGULARITY_ENVIRONMENT
# Install R
apt-get update
apt-get install -y --no-install-recommends software-properties-common dirmngr wget uuid-runtime
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | \
tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
add-apt-repository \
"deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
apt-get install -y --no-install-recommends \
r-base=${R_VERSION}* \
r-base-core=${R_VERSION}* \
r-base-dev=${R_VERSION}* \
r-recommended=${R_VERSION}* \
r-base-html=${R_VERSION}* \
r-doc-html=${R_VERSION}* \
libcurl4-openssl-dev \
libssl-dev \
libxml2-dev \
libcairo2-dev \
libxt-dev \
libopenblas-dev
# Add a default CRAN mirror
echo "options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl')" >> /usr/lib/R/etc/Rprofile.site
# Fix R package libpaths (helps RStudio Server find the right directories)
mkdir -p /usr/lib64/R/etc
echo "R_LIBS_USER='/usr/lib64/R/library'" >> /usr/lib64/R/etc/Renviron
echo "R_LIBS_SITE='${R_PACKAGE_DIR}'" >> /usr/lib64/R/etc/Renviron
# Clean up
rm -rf /var/lib/apt/lists/*
# Install python3
apt-get -y install python3 wget
apt-get -y clean
/bin/bash <<EOF
# Install reticulate and text
Rscript -e 'install.packages("reticulate")'
Rscript -e 'install.packages("devtools")'
Rscript -e 'install.packages("glmnet")'
Rscript -e 'devtools::install_github("oscarkjell/text")'
# Create the Conda environment at a system folder
Rscript -e 'text::textrpp_install(prompt = FALSE)'
Rscript -e 'text::textrpp_initialize(save_profile = TRUE, prompt = FALSE, textEmbed_test = TRUE)'
EOF
I managed to get it to work by installing Miniconda before installing the text-package (see the Install Miniconda section below).
Bootstrap: docker
From: ubuntu:20.04
%environment
export LANG=C.UTF-8 LC_ALL=C.UTF-8
export XDG_RUNTIME_DIR=/tmp/.run_$(uuidgen)
%post
# Install
apt-get -y update
export R_VERSION=4.1.3
echo "export R_VERSION=${R_VERSION}" >> $SINGULARITY_ENVIRONMENT
# Install R
apt-get update
apt-get install -y --no-install-recommends software-properties-common dirmngr wget uuid-runtime
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | \
tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
add-apt-repository \
"deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
apt-get install -y --no-install-recommends \
r-base=${R_VERSION}* \
r-base-core=${R_VERSION}* \
r-base-dev=${R_VERSION}* \
r-recommended=${R_VERSION}* \
r-base-html=${R_VERSION}* \
r-doc-html=${R_VERSION}* \
libcurl4-openssl-dev \
libssl-dev \
libxml2-dev \
libcairo2-dev \
libxt-dev \
libopenblas-dev
# Add a default CRAN mirror
echo "options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl')" >> /usr/lib/R/etc/Rprofile.site
# Fix R package libpaths (helps RStudio Server find the right directories)
mkdir -p /usr/lib64/R/etc
echo "R_LIBS_USER='/usr/lib64/R/library'" >> /usr/lib64/R/etc/Renviron
echo "R_LIBS_SITE='${R_PACKAGE_DIR}'" >> /usr/lib64/R/etc/Renviron
# Clean up
rm -rf /var/lib/apt/lists/*
# Install python3
apt-get -y install python3 wget
apt-get -y clean
# Install Miniconda
cd /
wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p /miniconda
/bin/bash <<EOF
rm Miniconda3-latest-Linux-x86_64.sh
source /miniconda/etc/profile.d/conda.sh
conda update -y conda
# Install reticulate and text
Rscript -e 'install.packages("reticulate")'
Rscript -e 'install.packages("devtools")'
Rscript -e 'install.packages("glmnet")'
Rscript -e 'devtools::install_github("oscarkjell/text")'
# Create the Conda environment at a system folder
Rscript -e 'text::textrpp_install(prompt = FALSE)'
Rscript -e 'text::textrpp_initialize(save_profile = TRUE, prompt = FALSE, textEmbed_test = TRUE)'
EOF
I have a rails application that combines some R code. It works fine, and now is the time to dockerize it. I tried creating the docker based on a ruby image, which failed installing R properly, and then the other way around (R image, installing ruby using rbenv as explained here) which failed too.
Has anyone experienced with this combo?
EDIT: I have managed to create a docker using the R image, however this requires a tiring installation of many ruby dependencies. So consider this side done.
Still, why won't the other way (installing R on ruby image) work?
Ruby-based:
FROM ruby:2.7.1 AS rails-toolbox
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
RUN mkdir /app
WORKDIR /app
ADD shalev/Gemfile /app/Gemfile
ADD shalev/Gemfile.lock /app/Gemfile.lock
RUN bundle install --without development test doc --jobs=4
RUN apt-get install -y apt-utils
RUN apt-get install -y apt-transport-https
RUN wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
RUN echo "deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/" | tee -a /etc/apt/sources.list
RUN apt-get update
RUN apt-get install r-base
COPY shalev/ /app/
[...]
error message:
Step 13/20 : RUN apt-get install r-base
---> Running in f546cfe57d33
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested 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 information may help to resolve the situation:
The following packages have unmet dependencies:
r-base : Depends: r-base-core (>= 3.6.3-1bionic) but it is not going to be installed
Depends: r-recommended (= 3.6.3-1bionic) but it is not going to be installed
Recommends: r-base-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
The command '/bin/sh -c apt-get install r-base' returned a non-zero code: 100
R-based:
FROM rocker/r-ver:3.6.3
RUN apt-get update -qq && apt-get install -y apt-utils apt-transport-https build-essential libpq-dev nodejs
RUN apt-get install -y git-core zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs yarn curl bzip2
RUN git clone https://github.com/rbenv/rbenv.git ~/.rbenv \
&& echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc \
&& echo 'eval "$(rbenv init -)"' >> ~/.bashrc
ENV HOME /home/shalev
ENV PATH "$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"
ENV RUBY_VERSION 2.7.1
RUN mkdir -p "$(rbenv root)"/plugins \
&& git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
RUN rbenv install $RUBY_VERSION
RUN rbenv global $RUBY_VERSION && rbenv versions && ruby -v
RUN mkdir /app
[...]
error message:
Step 9/25 : RUN rbenv install $RUBY_VERSION
---> Running in 9939299d6ed1
/bin/sh: 1: rbenv: not found
You can use the stand alone version of ruby-build.
Note that you are root and not shalev inside the container:
FROM rocker/r-ver:3.6.3
RUN apt-get update -qq && \
apt-get install -y \
apt-utils apt-transport-https \
build-essential libpq-dev nodejs
RUN apt-get install -y \
git-core zlib1g-dev build-essential \
libssl-dev libreadline-dev libyaml-dev \
libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev \
libcurl4-openssl-dev software-properties-common \
libffi-dev nodejs yarn curl bzip2
RUN git clone https://github.com/rbenv/rbenv.git ~/.rbenv \
&& echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc \
&& echo 'eval "$(rbenv init -)"' >> ~/.bashrc
ENV PATH "/root/.rbenv/bin/:/root/.rbenv/shims/:$PATH"
ENV RUBY_VERSION 2.7.1
RUN git clone https://github.com/rbenv/ruby-build.git && \
PREFIX=/usr/local ./ruby-build/install.sh
RUN rbenv install $RUBY_VERSION && \
rbenv global $RUBY_VERSION && \
rbenv versions
RUN mkdir /app
I managed to make it work with the ruby image as well:
FROM ruby:2.7.1 AS rails-toolbox
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
RUN apt-get install -y apt-utils apt-transport-https
RUN apt-get install -y gfortran
RUN wget -c https://cran.r-project.org/src/base/R-3/R-3.6.3.tar.gz
RUN tar -xf R-3.6.3.tar.gz
WORKDIR "/R-3.6.3"
RUN ./configure
RUN make -j9
RUN make install
WORKDIR "/root"
RUN mkdir /app
[...]
I am getting this error while making an image through docker on lambda.
** [ERROR] OSError: cannot load library '/usr/local/lib64/R/lib/libR.so': /usr/local/lib64/R/lib/libR.so: cannot open shared object file: No such file or directory**
Docker file:
FROM public.ecr.aws/lts/ubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y wget
RUN apt-get install -y software-properties-common
RUN apt-get install -y gcc gfortran build-essential
RUN apt-get update
RUN apt-get install -y libcurl4-openssl-dev
RUN apt-get install -y zlib1g zlib1g-dev libbz2-dev liblzma-dev libpcre++-dev libpango1.0-dev \
xorg-dev \
libreadline-dev
RUN wget -c https://cran.r-project.org/src/base/R-3/R-3.5.0.tar.gz && tar -xf R-3.5.0.tar.gz
RUN cd R-3.5.0 && ./configure --with-readline=no --with-x=no && make && make install
RUN R -e "install.packages('remotes', repos = 'http://cran.us.r-project.org')"
RUN R -e "require(remotes)"
RUN R -e "remotes::install_version('text2vec', version = '0.5.1', repos = 'http://cran.us.r-project.org')"
RUN export LD_LIBRARY_PATH="/usr/local/lib64:$LD_LIBRARY_PATH"
COPY requirements.txt ./
RUN apt-get update && apt-get install -y \
python3.8 \
python3-pip
RUN pip3 install -r requirements.txt
RUN pip3 install \
awslambdaric
RUN ln -s /usr/lib64/R/lib/* /usr/local/lib64/R/lib/
COPY lambda_function.py ./
ENTRYPOINT [ "/usr/bin/python3", "-m", "awslambdaric" ]
CMD ["lambda_function.lambda_handler"]
Any help would be appreciated!
I cleaned up the first parts of your Dockerfile as
FROM public.ecr.aws/lts/ubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
wget \
software-properties-common \
gcc gfortran build-essential \
libcurl4-openssl-dev \
zlib1g zlib1g-dev libbz2-dev liblzma-dev libpcre++-dev libpango1.0-dev \
xorg-dev \
libreadline-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN wget -c https://cran.r-project.org/src/base/R-3/R-3.5.0.tar.gz && \
tar -xf R-3.5.0.tar.gz && \
cd R-3.5.0 && \
./configure --with-readline=no --with-x=no --enable-R-shlib && \
make -j && make install
Putting all the apt-get into one RUN allows one to clean up by removing apt cache files. Using make -j builds R in parallel, which can speed up the build significantly.
I then built it, and launched the resulting image using bash to see that libR.so did indeed exist.
$ docker build .
...
Successfully built f1d83e97e8ef
$ docker run -it --rm f1d83e97e8ef bash
root#add29666d5d5:/# ls -l /usr/local/lib64/R/lib
total 21984
-rwxr-xr-x 1 root root 16815248 Sep 5 14:43 libR.so
-rwxr-xr-x 1 root root 462896 Sep 5 14:43 libRblas.so
-rwxr-xr-x 1 root root 5226296 Sep 5 14:43 libRlapack.so
libR.so exists and permissions (read and execute for all) are appropriate.
I don't think exporting LD_LIBRARY_PATH or creating a symbolic link should be necessary.
I am basing my docker image on https://hub.docker.com/r/rocker/tidyverse/dockerfile
So I tried to add the following line to the docker file to try and install libparquet-dev which is required to use Arrow from R.
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
libparquet-dev
which complains about E: Unable to locate package libparquet-dev, so I tried to follow this guide and added the follwoing lines
RUN apt update && \
apt install -y -V apt-transport-https gnupg lsb-release wget && \
wget -O /usr/share/keyrings/apache-arrow-keyring.gpg https://dl.bintray.com/apache/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-keyring.gpg && \
sudo tee /etc/apt/sources.list.d/apache-arrow.list <<APT_LINE \
deb [arch=amd64 signed-by=/usr/share/keyrings/apache-arrow-keyring.gpg] https://dl.bintray.com/apache/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/ $(lsb_release --codename --short) main \
deb-src [signed-by=/usr/share/keyrings/apache-arrow-keyring.gpg] https://dl.bintray.com/apache/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/ $(lsb_release --codename --short) main \
APT_LINE && \
apt update && \
apt install -y -V libarrow-dev && \
apt install -y -V libarrow-glib-dev && \
apt install -y -V libarrow-flight-dev && \
apt install -y -V libplasma-dev && \
apt install -y -V libplasma-glib-dev && \
apt install -y -V libgandiva-dev && \
apt install -y -V libgandiva-glib-dev && \
apt install -y -V libparquet-dev && \
apt install -y -V libparquet-glib-dev
which is now complain about
2019-11-13 03:56:56 (116 KB/s) - ‘/usr/share/keyrings/apache-arrow-keyring.gpg’ saved [44156/44156]
tee: 'signed-by=/usr/share/keyrings/apache-arrow-keyring.gpg]': No such file or directory
tee: 'https://dl.bintray.com/apache/arrow/debian/': No such file or directory
tee: '[signed-by=/usr/share/keyrings/apache-arrow-keyring.gpg]': No such file or directory
tee: 'https://dl.bintray.com/apache/arrow/debian/': No such file or directory
So how do I install libparquet-dev on Docker?
Edit
Putting the above into a .sh file and then just run that instead of putting them in a RUN command seems to help but I get another error now
The following packages have unmet dependencies:
libplasma-dev : Depends: libarrow-cuda-dev (= 0.15.1-1) but it is not going to be installed
Depends: libplasma15 (= 0.15.1-1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Firstly, that's wrong Docker syntax so
put the instruction in an .sh file and just run that file instead.
Shorten the installation to below so you only install the libparquet-dev and not all the others
apt update
apt install -y -V apt-transport-https curl gnupg lsb-release
tee /etc/apt/sources.list.d/backports.list <<APT_LINE
deb http://deb.debian.org/debian $(lsb_release --codename --short)-backports main
APT_LINE
curl --output /usr/share/keyrings/apache-arrow-keyring.gpg https://dl.bintray.com/apache/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-keyring.gpg
tee /etc/apt/sources.list.d/apache-arrow.list <<APT_LINE
deb [arch=amd64 signed-by=/usr/share/keyrings/apache-arrow-keyring.gpg] https://dl.bintray.com/apache/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/ $(lsb_release --codename --short) main
deb-src [signed-by=/usr/share/keyrings/apache-arrow-keyring.gpg] https://dl.bintray.com/apache/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/ $(lsb_release --codename --short) main
APT_LINE
curl https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
tee /etc/apt/sources.list.d/llvm.list <<APT_LINE
deb http://apt.llvm.org/$(lsb_release --codename --short)/ llvm-toolchain-$(lsb_release --codename --short)-7 main
deb-src http://apt.llvm.org/$(lsb_release --codename --short)/ llvm-toolchain-$(lsb_release --codename --short)-7 main
APT_LINE
apt update
apt install -y -V libparquet-dev
the finalised Dockerfile should look like, and noticed that installation of {arrow} should come after installation of libparquet-dev because we need to install {arrow} from source, and libparquet-dev needs to be there when installing from source.
FROM rocker/tidyverse
COPY create-parquet.sh create-parquet.sh
RUN chmod +x ./create-parquet.sh
RUN ./create-parquet.sh
RUN install2.r --error \
--deps TRUE \
disk.frame \
arrow
RUN R -e "arrow::install_arrow()"
CMD ["R"]
I was trying to install dotnet-sdk2.1.101 on my Ubuntu 16.04 server today but following error occured:
"dotnet-sdk-2.1.101 : Depends: aspnetcore-store-2.0.6 but it but it is not going to be installed"
Steps taken: (followed instructions on microsoft website):
wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-2.1
Any help is much appreciated :)
Following a guide on Upgrading to dotnet core 2.1.4 on Ubuntu 16.04 resolved this issue on my end:
First, Setup the package manager.
$ curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
$ sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
$ sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
$ sudo apt-get update
Next, Install .NET Core 2.x
$ sudo apt-get install dotnet-sdk-2.1.4
I have fixed my own issue following these below steps:
wget -q packages-microsoft-prod.deb https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update –y
sudo apt-get install dotnet-sdk-2.1.101
For me previous didn't help.
But for me worked the next:
wget http://ftp.us.debian.org/debian/pool/main/i/icu/libicu57_57.1-6+deb9u2_amd64.deb
sudo dpkg -i libicu57_57.1-6+deb9u2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu60_60.2-6ubuntu1_amd64.deb
sudo dpkg -i libicu60_60.2-6ubuntu1_amd64.deb
sudo apt-get install dotnet-sdk-2.1
I don't quite understand did I need 2 versions of libicu, but after 1st it required the 2nd one.