Ubuntu12.0安装g++过程及其报错
https://blog.csdn.net/weixin_51286763/article/details/120703953
https://blog.csdn.net/dingd1234/article/details/124029945
2.报错二:
[41/80] Building CXX object absl/synchronization/CMakeFiles/graphcycles_internal.dir/internal/graphcycles.cc.o
FAILED: absl/synchronization/CMakeFiles/graphcycles_internal.dir/internal/graphcycles.cc.o
/usr/bin/c++ -D__CLANG_SUPPORT_DYN_ANNOTATION__ -I/home/eaibot/cartoros2_ws/abseil-cpp -O3 -DNDEBUG -fPIC -Wall -Wextra -Wcast-qual -Wconversion-null -Wmissing-declarations -Woverlength-strings -Wpointer-arith -Wunused-local-typedefs -Wunused-result -Wvarargs -Wvla -Wwrite-strings -Wno-missing-field-initializers -Wno-sign-compare -std=gnu++17 -MD -MT absl/synchronization/CMakeFiles/graphcycles_internal.dir/internal/graphcycles.cc.o -MF absl/synchronization/CMakeFiles/graphcycles_internal.dir/internal/graphcycles.cc.o.d -o absl/synchronization/CMakeFiles/graphcycles_internal.dir/internal/graphcycles.cc.o -c /home/eaibot/cartoros2_ws/abseil-cpp/absl/synchronization/internal/graphcycles.cc
/home/eaibot/cartoros2_ws/abseil-cpp/absl/synchronization/internal/graphcycles.cc: In member function ‘void absl::synchronization_internal::GraphCycles::RemoveNode(void*)’:
/home/eaibot/cartoros2_ws/abseil-cpp/absl/synchronization/internal/graphcycles.cc:450:26: error: ‘numeric_limits’ is not a member of ‘std’
450 | if (x->version == std::numeric_limits<uint32_t>::max()) {
| ^~~~~~~~~~~~~~
/home/eaibot/cartoros2_ws/abseil-cpp/absl/synchronization/internal/graphcycles.cc:450:49: error: expected primary-expression before ‘>’ token
450 | if (x->version == std::numeric_limits<uint32_t>::max()) {
| ^
/home/eaibot/cartoros2_ws/abseil-cpp/absl/synchronization/internal/graphcycles.cc:450:52: error: ‘::max’ has not been declared; did you mean ‘std::max’?
450 | if (x->version == std::numeric_limits<uint32_t>::max()) {
| ^~~
| std::max
In file included from /usr/include/c++/11/algorithm:62,
from /home/eaibot/cartoros2_ws/abseil-cpp/absl/synchronization/internal/graphcycles.cc:38:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
解决办法:
sudo vim /usr/include/c++/11/bits/stl_algo.h
对应的文件中添加头文件
#include <limits>
添加 #include <limits>
configure: error: in `/home/wangkun/Desktop/swig-4.0.0':
configure: error:
Cannot find pcre-config script from PCRE (Perl Compatible Regular Expressions)
library package. This dependency is needed for configure to complete,
Either:
- Install the PCRE developer package on your system (preferred approach).
- Download the PCRE source tarball, build and install on your system
as you would for any package built from source distribution.
- Use the Tools/pcre-build.sh script to build PCRE just for SWIG to statically
link against. Run 'Tools/pcre-build.sh --help' for instructions.
(quite easy and does not require privileges to install PCRE on your system)
- Use configure --without-pcre to disable regular expressions support in SWIG
(not recommended).
See `config.log' for more details
(venv) wangkun@wangkun-virtual-machine:~/Desktop/swig-4.0.0$ ./configure --without-pcre文章来源:https://www.toymoban.com/news/detail-796150.html
Could NOT find PythonLibs (missingPYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is at least 3.5)
我是在ubuntu16.04.6
直接在你的正在操作的页面输入
ubuntu22.04
sudo apt-get install -y python-dev python3-dev
centos7
yum install python3-devel文章来源地址https://www.toymoban.com/news/detail-796150.html
centos7配置gcc11、g++11
yum -y install centos-release-scl
yum -y install devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-binutils
scl enable devtoolset-11 bash # 临时启用
到了这里,关于Ubuntu12.0安装g++过程及其报错的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!