Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker file failed on Ubuntu 22.04 and ros2 humble #18

Open
astronaut71 opened this issue Jun 26, 2023 · 1 comment
Open

docker file failed on Ubuntu 22.04 and ros2 humble #18

astronaut71 opened this issue Jun 26, 2023 · 1 comment

Comments

@astronaut71
Copy link

astronaut71 commented Jun 26, 2023

Hi

I have Ubuntu.22.04 and ros2 humble. Tried to run the sudo bash build.sh but then got this error.

=> [internal] load build definition from Dockerfile                                                                                        0.1s
 => => transferring dockerfile: 2.20kB                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                           0.1s
 => => transferring context: 2B                                                                                                             0.0s
 => [internal] load metadata for docker.io/library/ubuntu:18.04                                                                             2.2s
 => [ 1/23] FROM docker.io/library/ubuntu:18.04@sha256:152dc042452c496007f07ca9127571cb9c29697f42acbfad72324b2bb2e43c98                     0.0s
 => [internal] load build context                                                                                                           0.0s
 => => transferring context: 106B                                                                                                           0.0s
 => CACHED [ 2/23] WORKDIR /root                                                                                                            0.0s
 => CACHED [ 3/23] COPY scripts /root/scripts                                                                                               0.0s
 => CACHED [ 4/23] RUN apt-get update && apt-get install -y     wget     curl     git     vim     nano     python-dev     python3-pip       0.0s
 => CACHED [ 5/23] WORKDIR /root                                                                                                            0.0s
 => CACHED [ 6/23] WORKDIR /root                                                                                                            0.0s
 => CACHED [ 7/23] RUN git clone https://github.com/raulmur/ORB_SLAM2.git                                                                   0.0s
 => CACHED [ 8/23] RUN apt-get install -y   libboost-system-dev                                                                             0.0s
 => CACHED [ 9/23] WORKDIR /root/ORB_SLAM2                                                                                                  0.0s
 => CACHED [10/23] RUN git apply /root/scripts/orbslam.patch                                                                                0.0s
 => CACHED [11/23] RUN chmod +x /root/scripts/build.sh                                                                                      0.0s
 => ERROR [12/23] RUN /bin/bash -c 'export LD_LIBRARY_PATH=~/Pangolin/build/src/:$LD_LIBRARY_PATH;   bash $HOME/scripts/build.sh'           3.0s
------                                                                                                                                           
 > [12/23] RUN /bin/bash -c 'export LD_LIBRARY_PATH=~/Pangolin/build/src/:$LD_LIBRARY_PATH;   bash $HOME/scripts/build.sh':                      
#0 1.043 Configuring and building Thirdparty/DBoW2 ...                                                                                           
#0 1.058 /root/scripts/build.sh: line 6: cmake: command not found
#0 1.066 make: *** No targets specified and no makefile found.  Stop.
#0 1.067 Configuring and building Thirdparty/g2o ...
#0 1.071 /root/scripts/build.sh: line 15: cmake: command not found
#0 1.076 make: *** No targets specified and no makefile found.  Stop.
#0 1.076 Uncompress vocabulary ...
#0 2.702 Configuring and building ORB_SLAM2 ...
#0 2.705 /root/scripts/build.sh: line 30: cmake: command not found
#0 2.706 make: *** No targets specified and no makefile found.  Stop.
#0 2.708 make: *** No rule to make target 'install'.  Stop.
------
Dockerfile:59
--------------------
  58 |     RUN chmod +x $HOME/scripts/build.sh
  59 | >>> RUN /bin/bash -c 'export LD_LIBRARY_PATH=~/Pangolin/build/src/:$LD_LIBRARY_PATH; \
  60 | >>>   bash $HOME/scripts/build.sh'
  61 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c /bin/bash -c 'export LD_LIBRARY_PATH=~/Pangolin/build/src/:$LD_LIBRARY_PATH;   bash $HOME/scripts/build.sh'" did not complete successfully: exit code: 2

Any help?

@evenrohancodes
Copy link

Suggestion:
error in the message indicates there are missing dependencies and commands in the Dockerfile, which is causing the build to fail. Specifically, the cmake command is not found, and there are no make targets specified.
And ensure that the necessary dependencies are installed in the Docker image/file before running the build script

Or I guess try opening the Dockerfile used for building the image.
Make sure that the required dependencies, including cmake, are installed. example, and you can try adding the following line to install cmake:

$RUN apt-get update && apt-get install -y cmake

And after updating the 'Dockerfile' try building the Docker image again using the:
$sudo bash build.sh

else provide me with the source code to see if i can help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants