문제를 만들 : 대상 /usr/lib/x86_64-linux-gnu/libpcl_common.so를 만드는 규칙이 없습니다.


8

이 자습서를 따라 PCL (포인트 클라우드 라이브러리)에서 제공하는 예제 중 하나를 실행하고 있습니다. https://www.youtube.com/watch?v=CXK95Hi4M7I

그러나 make 명령 ( https://youtu.be/CXK95Hi4M7I?t=243 )을 실행할 때 다음과 같은 출력이 나타납니다.

yalishanda@yalishanda-thinkpad-x200:~/PCL/visualRangeExample/build$ make
make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libpcl_common.so', needed by 'range_image_visualization'.  Stop.
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/range_image_visualization.dir/all' failed
make[1]: *** [CMakeFiles/range_image_visualization.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

누군가 문제가 무엇인지 어떻게 해결할 수 있습니까?

감사합니다

편집하다:

cmake가 생성 한 Makefile :

# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.5

# Default target executed when no arguments are given to make.
default_target: all

.PHONY : default_target

# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:


#=============================================================================
# Special targets provided by cmake.

# Disable implicit rules so canonical targets will work.
.SUFFIXES:


# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =

.SUFFIXES: .hpux_make_needs_suffix_list


# Suppress display of executed commands.
$(VERBOSE).SILENT:


# A target that is always out of date.
cmake_force:

.PHONY : cmake_force

#=============================================================================
# Set environment variables for the build.

# The shell in which to execute make rules.
SHELL = /bin/sh

# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake

# The command to remove a file.
RM = /usr/bin/cmake -E remove -f

# Escaping for special characters.
EQUALS = =

# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/yalishanda/PCL/visualRangeExample

# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/yalishanda/PCL/visualRangeExample/build

#=============================================================================
# Targets provided globally by CMake.

# Special rule for the target edit_cache
edit_cache:
    @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
    /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
.PHONY : edit_cache

# Special rule for the target edit_cache
edit_cache/fast: edit_cache

.PHONY : edit_cache/fast

# Special rule for the target rebuild_cache
rebuild_cache:
    @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
    /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache

# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache

.PHONY : rebuild_cache/fast

# The main all target
all: cmake_check_build_system
    $(CMAKE_COMMAND) -E cmake_progress_start /home/yalishanda/PCL/visualRangeExample/build/CMakeFiles /home/yalishanda/PCL/visualRangeExample/build/CMakeFiles/progress.marks
    $(MAKE) -f CMakeFiles/Makefile2 all
    $(CMAKE_COMMAND) -E cmake_progress_start /home/yalishanda/PCL/visualRangeExample/build/CMakeFiles 0
.PHONY : all

# The main clean target
clean:
    $(MAKE) -f CMakeFiles/Makefile2 clean
.PHONY : clean

# The main clean target
clean/fast: clean

.PHONY : clean/fast

# Prepare targets for installation.
preinstall: all
    $(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall

# Prepare targets for installation.
preinstall/fast:
    $(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall/fast

# clear depends
depend:
    $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend

#=============================================================================
# Target rules for targets named range_image_visualization

# Build rule for target.
range_image_visualization: cmake_check_build_system
    $(MAKE) -f CMakeFiles/Makefile2 range_image_visualization
.PHONY : range_image_visualization

# fast build rule for target.
range_image_visualization/fast:
    $(MAKE) -f CMakeFiles/range_image_visualization.dir/build.make CMakeFiles/range_image_visualization.dir/build
.PHONY : range_image_visualization/fast

range_image_visualization.o: range_image_visualization.cpp.o

.PHONY : range_image_visualization.o

# target to build an object file
range_image_visualization.cpp.o:
    $(MAKE) -f CMakeFiles/range_image_visualization.dir/build.make CMakeFiles/range_image_visualization.dir/range_image_visualization.cpp.o
.PHONY : range_image_visualization.cpp.o

range_image_visualization.i: range_image_visualization.cpp.i

.PHONY : range_image_visualization.i

# target to preprocess a source file
range_image_visualization.cpp.i:
    $(MAKE) -f CMakeFiles/range_image_visualization.dir/build.make CMakeFiles/range_image_visualization.dir/range_image_visualization.cpp.i
.PHONY : range_image_visualization.cpp.i

range_image_visualization.s: range_image_visualization.cpp.s

.PHONY : range_image_visualization.s

# target to generate assembly for a file
range_image_visualization.cpp.s:
    $(MAKE) -f CMakeFiles/range_image_visualization.dir/build.make CMakeFiles/range_image_visualization.dir/range_image_visualization.cpp.s
.PHONY : range_image_visualization.cpp.s

# Help Target
help:
    @echo "The following are some of the valid targets for this Makefile:"
    @echo "... all (the default if no target is provided)"
    @echo "... clean"
    @echo "... depend"
    @echo "... edit_cache"
    @echo "... range_image_visualization"
    @echo "... rebuild_cache"
    @echo "... range_image_visualization.o"
    @echo "... range_image_visualization.i"
    @echo "... range_image_visualization.s"
.PHONY : help



#=============================================================================
# Special targets to cleanup operation of make.

# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
    $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system

CMakeLists.txt 파일 :

cmake_minimum_required(VERSION 2.6 FATAL_ERROR)

project(range_image_visualization)

find_package(PCL 1.3 REQUIRED)

include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

add_executable (range_image_visualization range_image_visualization.cpp)
target_link_libraries (range_image_visualization ${PCL_LIBRARIES})

당신은 한하십니까 libproj-dev설치되어 있습니까? 설치 한 후 다시 시도하십시오.
Seth

@Seth 예, 이미 설치되어 있습니다. 나는 Makefile로 내 게시물을 업데이트했다
LandonZeKepitelOfGreytBritn

답변:


12

오류:

make [2] : *** 'range_image_visualization'에 필요한 대상 '/usr/lib/x86_64-linux-gnu/libpcl_common.so'를 만드는 규칙이 없습니다. 중지.

make가 /usr/lib/x86_64-linux-gnu/libpcl_common.so컴파일을 완료하는 데 필요한 파일 을 찾을 수 없음을 의미합니다 .

먼저 파일이 존재하는지 확인하십시오.

$ stat /usr/lib/x86_64-linux-gnu/libpcl_common.so  
stat: cannot stat '/usr/lib/x86_64-linux-gnu/libpcl_common.so': No such file or directory  

자, 설치해야합니다. 패키지 libpcl_common.so가 무엇을 제공하는지 알아내는 가장 쉬운 방법 은이라는 도구를 사용하는 것 apt-file입니다. 설치하고 설정하십시오 :

sudo apt-get install apt-file
apt-file update

완료되면 다음을 실행할 수 있습니다.

$ apt-file search /usr/lib/x86_64-linux-gnu/libpcl_common.so  
libpcl-common1.8: /usr/lib/x86_64-linux-gnu/libpcl_common.so.1.8
libpcl-common1.8: /usr/lib/x86_64-linux-gnu/libpcl_common.so.1.8.0
libpcl-dev: /usr/lib/x86_64-linux-gnu/libpcl_common.so

그리고 당신은 간다! 설치 libpcl-dev하고 당신은 황금해야합니다.

또한 일반적으로 소스 디렉토리 내에 설치해야 할 종속성 목록이 포함 된 README 파일이 있어야하므로이 추측 중 일부를 제거하고 시간을 절약하는 데 도움이됩니다.


btw, 일반적으로 apt-cache를 사용하여 패키지를 찾습니다. 다시 말해서 여기에 "sudo apt-cache pkgnames libpcl"을 시도했는데 더 많은 옵션이 있습니다. 그러나 나는 어느 것을 설치할 것인지 전혀 모른다. 항상 대체 파일 인 apt 파일을 사용하는 것이 더 낫습니까? 그것들은 어떻게 다릅니 까?
LandonZeKepitelOfGreytBritn

1
@trilolil apt-cache search은 패키지 이름과 간단한 설명 만 검색합니다. apt-file search검색 한 파일이 포함 된 패키지를 찾기 위해 패키지 내부를 찾고 있습니다.
Seth
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.