No package python-devel available.
时间: 2023-08-12 10:09:01 浏览: 156
如果在执行 `sudo yum install python-devel` 命令时提示 `No package python-devel available`,可能是因为该软件包没有被包含在您的系统软件源中。
您可以尝试通过更新软件源来解决此问题。执行以下命令:
```
sudo yum update
```
然后再次尝试安装Python开发包:
```
sudo yum install python-devel
```
如果更新软件源后仍然找不到Python开发包,则可能需要手动添加软件源。您可以在互联网上查找适合您的CentOS版本的软件源,并按照说明进行手动添加。
希望这可以帮助您解决问题。
相关问题
centos 7 安装 python-dev包提示No package python-dev available
在CentOS 7中,Python开发包的名称是python-devel,而不是python-dev。你可以通过以下命令来安装Python开发包:
```
sudo yum install python-devel
```
如果你需要安装Python 3开发包,则需要使用以下命令:
```
sudo yum install python3-devel
```
希望能帮到你。
Base path: /home/dama/demo02_ws Source space: /home/dama/demo02_ws/src Build space: /home/dama/demo02_ws/build Devel space: /home/dama/demo02_ws/devel Install space: /home/dama/demo02_ws/install #### #### Running command: "make cmake_check_build_system" in "/home/dama/demo02_ws/build" #### -- Using CATKIN_DEVEL_PREFIX: /home/dama/demo02_ws/devel -- Using CMAKE_PREFIX_PATH: /home/dama/demo02_ws/devel;/home/dama/demo01_ws/devel;/opt/ros/noetic -- This workspace overlays: /home/dama/demo02_ws/devel;/home/dama/demo01_ws/devel;/opt/ros/noetic -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3") -- Using PYTHON_EXECUTABLE: /usr/bin/python3 -- Using Debian Python package layout -- Using empy: /usr/lib/python3/dist-packages/em.py -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/dama/demo02_ws/build/test_results -- Forcing gtest/gmock from source, though one was otherwise available. -- Found gtest sources under '/usr/src/googletest': gtests will be built -- Found gmock sources under '/usr/src/googletest': gmock will be built -- Found PythonInterp: /usr/bin/python3 (found version "3.8.10") -- Using Python nosetests: /usr/bin/nosetests3 -- catkin 0.8.10 -- BUILD_SHARED_LIBS is on -- BUILD_SHARED_LIBS is on -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- ~~ traversing 1 packages in topological order: -- ~~ - hello_vscode -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- +++ processing catkin package: 'hello_vscode' -- ==> add_subdirectory(hello_vscode) CMake Error at /opt/ros/noetic/share/catkin/cmake/catkin_install_python.cmake:86 (message): catkin_install_python() called with non-existing file '/home/dama/demo02_ws/src/hello_vscode/scripts/hello_vscode_p.py'. Call Stack (most recent call first): hello_vscode/CMakeLists.txt:162 (catkin_install_python) -- Configuring incomplete, errors occurred! See also "/home/dama/demo02_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/dama/demo02_ws/build/CMakeFiles/CMakeError.log". make: *** [Makefile:544:cmake_check_build_system] 错误 1 Invoking "make cmake_check_build_system" failed
这段代码是ROS的编译过程中的错误信息,它指出在执行`catkin_install_python()`函数时,找不到指定的python文件`/home/dama/demo02_ws/src/hello_vscode/scripts/hello_vscode_p.py`。你可以检查一下这个文件路径是否正确,或者确认一下你的python文件是否存在。如果文件确实存在,那么可能是你的CMakeLists.txt文件中的配置有误导致的。你可以仔细检查一下CMakeLists.txt文件中与该python文件有关的部分是否正确,或者尝试重新生成一下CMakeLists.txt文件。另外,你也可以检查一下你的工作空间路径是否正确。希望我的回答能帮到你!
阅读全文