yaml-cpp
ライブラリをインストールします。 Ubuntuの(私のPC上の)にインストールするドッカーにライブラリをインストール
私は通常githubからそれをクローン化し、これらの手順を実行します。
cmake cmake [-G generator] [-DBUILD_SHARED_LIBS=ON|OFF] ..
make
make install
、それが正常に動作します。
私はDockerで同じ手順を実行します。それから私はMyProject
を開始し、CMakeLists.txt
(target_link_libraries(MyProject yaml-cpp)
)
にyaml-cpp
ライブラリに対してそれをリンクするしかし、私は、実行可能ファイルで起動しようとするとエラーが発生している:
マイDockerfile
がある
./MyProject: error while loading shared libraries: libyaml-cpp.so.0.5: cannot open shared object file: No such file or directory
UPD :
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y \
sudo \
git \
build-essential \
cmake \
libboost-dev \
libboost-all-dev \
doxygen \
unzip \
python3 \
wget
## Install SimGrid
RUN git clone https://github.com/simgrid/simgrid.git
WORKDIR "/simgrid"
RUN cmake -Denable_documentation=OFF -Denable_coverage=OFF -Denable_java=OFF -Denable_model-checking=OFF \
-Denable_lua=OFF -Denable_compile_optimizations=OFF -Denable_smpi=OFF -Denable_smpi_MPICH3_testsuite=OFF -Denable_compile_warnings=OFF .
RUN sudo sync; sudo make; sudo make install;
RUN cd lib && sudo cp * /usr/lib; cd ../include && sudo cp -a * /usr/include
## Install yaml-cpp parser
RUN git clone https://github.com/jbeder/yaml-cpp.git
WORKDIR "/yaml-cpp"
RUN mkdir build && cd build && cmake -DBUILD_SHARED_LIBS=ON .. && cd .. && make && make install
# LHCb grid simulation project
WORKDIR "/"
RUN git clone https://github.com/skygrid/grid_simulation.git
WORKDIR "/grid_simulation"
RUN sudo sysctl -w vm.max_map_count=500000
CMD ["./run.sh"]
あなたのdockerfileに関するさらに詳しい情報は、 – clue404
あなたのDockerfileを投稿すると、あなたはこのイメージをどのように構築しているかを見ることができます。 – gbolo
@ ro0kie4 @gbolo私は 'Dockerfile'を追加しました –