linux ubuntu std::format报错

### Linux Ubuntu 中 `std::format` 报错解决方案 在 Linux 的 Ubuntu 系统中,如果尝试使用 C++20 提供的标准库函数 `std::format` 时遇到了编译或链接错误,通常是因为以下几个原因: #### 原因分析 1. **C++标准未正确指定** 编译器可能默认使用的并非支持 `std::format` 的 C++20 或更高版本。这可能导致无法识别 `std::format` 函数[^1]。 2. **GCC 版本过低** GCC 是常用的 C++ 编译器之一,但在较旧的版本中并未完全实现 C++20 功能。例如,在 GCC 9 及更早版本中,`std::format` 不可用;而 GCC 11 开始才全面支持此功能[^1]。 3. **缺少必要的头文件** 使用 `std::format` 需要显式包含 `<format>` 头文件。如果没有引入该头文件,则会引发编译错误。 --- #### 解决方案 以下是针对上述问题的具体解决办法: ##### 方法一:确认并升级 GCC 到最新版本 确保当前系统的 GCC 至少为版本 11 或以上。可以通过以下命令检查现有版本: ```bash gcc --version ``` 如果版本低于 11,则需更新到兼容版本。对于 Ubuntu 用户来说,可以按照以下步骤操作: ```bash sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt update sudo apt install gcc-11 g++-11 update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100 ``` 完成安装后重新验证版本号以确保成功切换至新版本[^1]。 ##### 方法二:调整项目构建配置 当已具备合适版本的 GCC 后,还需修改项目的 Makefile 或 CMakeLists.txt 文件来启用 C++20 标准以及关联选项。 ###### 对于 GNU Make 工具链 编辑 Makefile 添加 `-std=c++20` 参数作为编译标志的一部分: ```makefile CXXFLAGS += -std=c++20 LDFLAGS += ``` ###### 如果采用的是 CMake 构建体系结构 则应在 CMakeLists.txt 中加入如下指令设定目标语言级别与所需特性集: ```cmake set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) target_sources(your_target PRIVATE your_code.cpp) target_include_directories(your_target PRIVATE ${PROJECT_SOURCE_DIR}/include) ``` 此外还应保证源码里确实包含了正确的头文件声明形式: ```cpp #include <iostream> #include <format> int main() { const char* name = "World"; std::string formatted_string = std::format("Hello, {}!", name); std::cout << formatted_string; } ``` ##### 方法三:回退至第三方替代品(备用策略) 假如暂时无法满足前述条件或者希望快速解决问题的话,也可以考虑利用其他成熟的开源库比如 [{fmt}](https://github.com/fmtlib/fmt),它提供了几乎一致的功能接口并且广泛应用于生产环境当中。其基本用法类似于这样子: ```cpp #include <fmt/core.h> int main(){ fmt::print("The answer is {}\n",42); // Output:The answer is 42 } ``` 只需下载对应发行包解压后再依照官方文档指引集成进工程即可[^1]。 --- ### 总结 综上所述,通过适当升级开发工具链、合理配置工程项目参数便能顺利调用现代 C++ 所定义的新成员——`std::format` 。当然,在特殊情况下选用成熟可靠的外部依赖亦不失为一种明智之举。

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

Python内容推荐

libstdc++.so.6.0.20获取

libstdc++.so.6.0.20获取

代码下载地址: https://pan.quark.cn/s/a9dca8098740 libstdc-.so.6.0.26 libstdc++.so.6.0.26

Ubuntu下Nachos开发环境的建立

Ubuntu下Nachos开发环境的建立

在Ubuntu下安装Nachos会有一些错误,该文档教你如何处理类似问题。

Ubuntu 20.04 下安装配置 VScode 的 C/C++ 开发环境(图文教程)

Ubuntu 20.04 下安装配置 VScode 的 C/C++ 开发环境(图文教程)

Enable pretty-printing for gdb

ubuntu的ftp部署配置

ubuntu的ftp部署配置

ubuntu的ftp部署配置

linux下opencv+qt读取并显示avi视频

linux下opencv+qt读取并显示avi视频

使用ubuntu下的opencv读取avi视频,视频每帧图片为Ipl格式,将Ipl格式转换成QImage格式从而使用QT进行显示。

ubuntu下配置weblogic和oracle[定义].pdf

ubuntu下配置weblogic和oracle[定义].pdf

ubuntu下配置weblogic和oracle[定义].pdf

ubuntu的vsftp配置.pdf

ubuntu的vsftp配置.pdf

ubuntu的vsftp配置.pdf

linux下opencv集成vlc读取rstp

linux下opencv集成vlc读取rstp

这是一个简单的小demo,Ubuntu16.04 opencv vlc 用vlc读取rstp流,opencv处理

Linux配置VSFTP服务器的方法

Linux配置VSFTP服务器的方法

下面小编就为大家带来一篇Linux配置VSFTP服务器的方法。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧

Linux vsftp配置手册

Linux vsftp配置手册

Linux vsftp配置手册Linux vsftp配置手册Linux vsftp配置手册Linux vsftp配置手册Linux vsftp配置手册Linux vsftp配置手册

linux下设置ftp及增加SSL服务.docx

linux下设置ftp及增加SSL服务.docx

linux下设置ftp及增加SSL服务.docx

ubuntu20.04-ROS noetic实现一个两轮差速移动机器人的仿真

ubuntu20.04-ROS noetic实现一个两轮差速移动机器人的仿真

使用Ubuntu20..04虚拟机在ROS-noetic环境下,利用URDF标签创建了一个两轮差速移动机器人模型,该机器人上包括摄像头、雷达等多传感器。最终使用xacro对代码进行优化。 食用方法: 1、新建工作空间; 2、将压缩包解压到工作空间; 3、对工作空间进行编译; 4、运行对应的launch文件。

ftp使用指南么ftp搭建,linux下的ftp搭建

ftp使用指南么ftp搭建,linux下的ftp搭建

有关ftp的介绍,很详细的。是有关frp的一些详细的介绍,感兴趣的可以学习一下,我在ubuntu论坛上面也发表了

opencv  采集 USB摄像头图像

opencv 采集 USB摄像头图像

qt+opencv编写,采集usb摄像头图像,并实时显示的例程

lichee_20170502_1607_全志R16的linux系统编译需要改动的文件_使用parrotv1.1的内核_没有外层目录.7z

lichee_20170502_1607_全志R16的linux系统编译需要改动的文件_使用parrotv1.1的内核_没有外层目录.7z

rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ tar zxvf lichee_parrotv1.1_20161202.tar.gz rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ ll 总用量 10786992 drwx------ 4 rootroot rootroot 4096 5月 2 14:48 ./ drwxrwxrwx 18 rootroot rootroot 4096 5月 2 13:50 ../ -rwx------ 1 rootroot rootroot 8557328646 12月 2 16:08 android_parrotv1.1_20161202.tar.gz* drwxrwxr-x 7 rootroot rootroot 4096 12月 2 15:52 lichee/ -rwx------ 1 rootroot rootroot 2488523424 12月 2 16:15 lichee_parrotv1.1_20161202.tar.gz* drwxrwxr-x 8 rootroot rootroot 4096 5月 2 14:40 parrotv1p1_lichee/ rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ cd lichee/ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ll 总用量 36 drwxrwxr-x 7 rootroot rootroot 4096 12月 2 15:52 ./ drwx------ 4 rootroot rootroot 4096 5月 2 14:48 ../ drwxrwxr-x 8 rootroot rootroot 4096 12月 2 15:51 brandy/ drwxrwxr-x 15 rootroot rootroot 4096 12月 2 15:52 buildroot/ -r-xr-xr-x 1 rootroot rootroot 55 12月 2 15:52 build.sh* drwxrwxr-x 26 rootroot rootroot 4096 12月 2 15:52 linux-3.4/ -r--r--r-- 1 rootroot rootroot 232 12月 2 15:52 README drwxrwxr-x 6 rootroot rootroot 4096 12月 2 15:51 .repo/ drwxrwxr-x 7 rootroot rootroot 4096 12月 2 15:52 tools/ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun8iw5p1 Choice: 0 All available platforms: 0. android 1. dragonboard 2. linux 3. tina Choice: 2 All available kernel: 0. linux-3.4 Choice: 0 All available boards: 0. bell-one 1. evb 2. evb-20 3. evb-30 4. evb-rtl8723bs 5. sc3813r Choice: 3 rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh KCONFIG_AUTOCONFIG=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/auto.conf KCONFIG_AUTOHEADER=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/autoconf.h KCONFIG_TRISTATE=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/tristate.config BUILDROOT_CONFIG=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/.config /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/conf --silentoldconfig Config.in # # make dependencies written to .auto.deps # ATTENTION buildroot devels! # See top of this file before playing with this auto-preprequisites! # make[1]:正在离开目录 `/home/wwt/linux_r16/lichee/buildroot' You must install 'makeinfo' on your build machine makeinfo is usually part of the texinfo package in your distribution make: *** [dependencies] 错误 1 make:离开目录“/home/wwt/linux_r16/lichee/buildroot” ERROR: build buildroot Failed rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ d/buildroot-config/conf.o /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/zconf.tab.o -o /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/conf rm /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/zconf.tab.c make[1]:正在离开目录 `/home/wwt/linux_r16/lichee/buildroot/package/config' # # configuration written to /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/.config # make:离开目录“/home/wwt/linux_r16/lichee/buildroot” make:进入目录'/home/wwt/linux_r16/lichee/buildroot' /usr/bin/make -j6 O=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot silentoldconfig make[1]: 正在进入目录 `/home/wwt/linux_r16/lichee/buildroot' GEN /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/Makefile KCONFIG_AUTOCONFIG=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/auto.conf KCONFIG_AUTOHEADER=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/autoconf.h KCONFIG_TRISTATE=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/tristate.config BUILDROOT_CONFIG=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/.config /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/conf --silentoldconfig Config.in # # make dependencies written to .auto.deps # ATTENTION buildroot devels! # See top of this file before playing with this auto-preprequisites! # make[1]:正在离开目录 `/home/wwt/linux_r16/lichee/buildroot' You must install 'makeinfo' on your build machine makeinfo is usually part of the texinfo package in your distribution make: *** [dependencies] 错误 1 make:离开目录“/home/wwt/linux_r16/lichee/buildroot” ERROR: build buildroot Failed rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ sudo apt-get install texinfo [sudo] password for rootroot: 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: fakeroot libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libfakeroot Use 'apt-get autoremove' to remove them. 将会安装下列额外的软件包: libencode-locale-perl libfile-listing-perl libfont-afm-perl libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libintl-perl libio-html-perl liblwp-mediatypes-perl liblwp-protocol-https-perl libnet-http-perl libtext-unidecode-perl libwww-perl libwww-robotrules-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-parser-perl libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl 建议安装的软件包: libdata-dump-perl libintl-xs-perl libcrypt-ssleay-perl libauthen-ntlm-perl texinfo-doc-nonfree 下列【新】软件包将被安装: libencode-locale-perl libfile-listing-perl libfont-afm-perl libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libintl-perl libio-html-perl liblwp-mediatypes-perl liblwp-protocol-https-perl libnet-http-perl libtext-unidecode-perl libwww-perl libwww-robotrules-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-parser-perl libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl texinfo 升级了 0 个软件包,新安装了 28 个软件包,要卸载 0 个软件包,有 737 个软件包未被升级。 需要下载 3,425 kB 的软件包。 解压缩后会消耗掉 13.0 MB 的额外空间。 您希望继续执行吗? [Y/n] y 获取:1 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libencode-locale-perl all 1.03-1 [12.4 kB] 获取:2 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhttp-date-perl all 6.02-1 [10.4 kB] 获取:3 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libfile-listing-perl all 6.04-1 [9,774 B] 获取:4 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libfont-afm-perl all 1.20-1 [14.3 kB] 获取:5 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhtml-tagset-perl all 3.20-2 [13.5 kB] 获取:6 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhtml-parser-perl amd64 3.71-1build1 [98.2 kB] 获取:7 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libio-html-perl all 1.00-1 [15.7 kB] 获取:8 http://cn.archive.ubuntu.com/ubuntu/ trusty/main liblwp-mediatypes-perl all 6.02-1 [21.7 kB] 获取:9 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhttp-message-perl all 6.06-1 [78.7 kB] 获取:10 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhtml-form-perl all 6.03-1 [23.5 kB] 获取:11 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhtml-tree-perl all 5.03-1 [215 kB] 获取:12 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhtml-format-perl all 2.11-1 [44.7 kB] 获取:13 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhttp-cookies-perl all 6.00-2 [23.3 kB] 获取:14 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhttp-daemon-perl all 6.01-1 [17.0 kB] 获取:15 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhttp-negotiate-perl all 6.00-2 [13.4 kB] 获取:16 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libintl-perl all 1.23-1build1 [1,204 kB] 获取:17 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libnet-http-perl all 6.06-1 [24.2 kB] 获取:18 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libwww-robotrules-perl all 6.01-1 [14.1 kB] 获取:19 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libwww-perl all 6.05-2 [146 kB] 获取:20 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main liblwp-protocol-https-perl all 6.04-2ubuntu0.1 [7,644 B] 获取:21 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libtext-unidecode-perl all 0.04-2 [115 kB] 获取:22 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libxml-namespacesupport-perl all 1.11-1 [13.2 kB] 获取:23 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libxml-sax-base-perl all 1.07-1 [21.5 kB] 获取:24 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libxml-sax-perl all 0.99+dfsg-2ubuntu1 [64.6 kB] 获取:25 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main libxml-libxml-perl amd64 2.0108+dfsg-1ubuntu0.1 [337 kB] 获取:26 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libxml-parser-perl amd64 2.41-1build3 [294 kB] 获取:27 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libxml-sax-expat-perl all 0.40-2 [11.5 kB] 获取:28 http://cn.archive.ubuntu.com/ubuntu/ trusty/main texinfo amd64 5.2.0.dfsg.1-2 [561 kB] 下载 3,425 kB,耗时 2秒 (1,303 kB/s) Selecting previously unselected package libencode-locale-perl. (正在读取数据库 ... 系统当前共安装有 213805 个文件和目录。) Preparing to unpack .../libencode-locale-perl_1.03-1_all.deb ... Unpacking libencode-locale-perl (1.03-1) ... Selecting previously unselected package libhttp-date-perl. Preparing to unpack .../libhttp-date-perl_6.02-1_all.deb ... Unpacking libhttp-date-perl (6.02-1) ... Selecting previously unselected package libfile-listing-perl. Preparing to unpack .../libfile-listing-perl_6.04-1_all.deb ... Unpacking libfile-listing-perl (6.04-1) ... Selecting previously unselected package libfont-afm-perl. Preparing to unpack .../libfont-afm-perl_1.20-1_all.deb ... Unpacking libfont-afm-perl (1.20-1) ... Selecting previously unselected package libhtml-tagset-perl. Preparing to unpack .../libhtml-tagset-perl_3.20-2_all.deb ... Unpacking libhtml-tagset-perl (3.20-2) ... Selecting previously unselected package libhtml-parser-perl. Preparing to unpack .../libhtml-parser-perl_3.71-1build1_amd64.deb ... Unpacking libhtml-parser-perl (3.71-1build1) ... Selecting previously unselected package libio-html-perl. Preparing to unpack .../libio-html-perl_1.00-1_all.deb ... Unpacking libio-html-perl (1.00-1) ... Selecting previously unselected package liblwp-mediatypes-perl. Preparing to unpack .../liblwp-mediatypes-perl_6.02-1_all.deb ... Unpacking liblwp-mediatypes-perl (6.02-1) ... Selecting previously unselected package libhttp-message-perl. Preparing to unpack .../libhttp-message-perl_6.06-1_all.deb ... Unpacking libhttp-message-perl (6.06-1) ... Selecting previously unselected package libhtml-form-perl. Preparing to unpack .../libhtml-form-perl_6.03-1_all.deb ... Unpacking libhtml-form-perl (6.03-1) ... Selecting previously unselected package libhtml-tree-perl. Preparing to unpack .../libhtml-tree-perl_5.03-1_all.deb ... Unpacking libhtml-tree-perl (5.03-1) ... Selecting previously unselected package libhtml-format-perl. Preparing to unpack .../libhtml-format-perl_2.11-1_all.deb ... Unpacking libhtml-format-perl (2.11-1) ... Selecting previously unselected package libhttp-cookies-perl. Preparing to unpack .../libhttp-cookies-perl_6.00-2_all.deb ... Unpacking libhttp-cookies-perl (6.00-2) ... Selecting previously unselected package libhttp-daemon-perl. Preparing to unpack .../libhttp-daemon-perl_6.01-1_all.deb ... Unpacking libhttp-daemon-perl (6.01-1) ... Selecting previously unselected package libhttp-negotiate-perl. Preparing to unpack .../libhttp-negotiate-perl_6.00-2_all.deb ... Unpacking libhttp-negotiate-perl (6.00-2) ... Selecting previously unselected package libintl-perl. Preparing to unpack .../libintl-perl_1.23-1build1_all.deb ... Unpacking libintl-perl (1.23-1build1) ... Selecting previously unselected package libnet-http-perl. Preparing to unpack .../libnet-http-perl_6.06-1_all.deb ... Unpacking libnet-http-perl (6.06-1) ... Selecting previously unselected package libwww-robotrules-perl. Preparing to unpack .../libwww-robotrules-perl_6.01-1_all.deb ... Unpacking libwww-robotrules-perl (6.01-1) ... Selecting previously unselected package libwww-perl. Preparing to unpack .../libwww-perl_6.05-2_all.deb ... Unpacking libwww-perl (6.05-2) ... Selecting previously unselected package liblwp-protocol-https-perl. Preparing to unpack .../liblwp-protocol-https-perl_6.04-2ubuntu0.1_all.deb ... Unpacking liblwp-protocol-https-perl (6.04-2ubuntu0.1) ... Selecting previously unselected package libtext-unidecode-perl. Preparing to unpack .../libtext-unidecode-perl_0.04-2_all.deb ... Unpacking libtext-unidecode-perl (0.04-2) ... Selecting previously unselected package libxml-namespacesupport-perl. Preparing to unpack .../libxml-namespacesupport-perl_1.11-1_all.deb ... Unpacking libxml-namespacesupport-perl (1.11-1) ... Selecting previously unselected package libxml-sax-base-perl. Preparing to unpack .../libxml-sax-base-perl_1.07-1_all.deb ... Unpacking libxml-sax-base-perl (1.07-1) ... Selecting previously unselected package libxml-sax-perl. Preparing to unpack .../libxml-sax-perl_0.99+dfsg-2ubuntu1_all.deb ... Unpacking libxml-sax-perl (0.99+dfsg-2ubuntu1) ... Selecting previously unselected package libxml-libxml-perl. Preparing to unpack .../libxml-libxml-perl_2.0108+dfsg-1ubuntu0.1_amd64.deb ... Unpacking libxml-libxml-perl (2.0108+dfsg-1ubuntu0.1) ... Selecting previously unselected package libxml-parser-perl. Preparing to unpack .../libxml-parser-perl_2.41-1build3_amd64.deb ... Unpacking libxml-parser-perl (2.41-1build3) ... Selecting previously unselected package libxml-sax-expat-perl. Preparing to unpack .../libxml-sax-expat-perl_0.40-2_all.deb ... Unpacking libxml-sax-expat-perl (0.40-2) ... Selecting previously unselected package texinfo. Preparing to unpack .../texinfo_5.2.0.dfsg.1-2_amd64.deb ... Unpacking texinfo (5.2.0.dfsg.1-2) ... Processing triggers for man-db (2.6.7.1-1) ... Processing triggers for doc-base (0.10.5) ... Processing 1 added doc-base file... 正在设置 libencode-locale-perl (1.03-1) ... 正在设置 libhttp-date-perl (6.02-1) ... 正在设置 libfile-listing-perl (6.04-1) ... 正在设置 libfont-afm-perl (1.20-1) ... 正在设置 libhtml-tagset-perl (3.20-2) ... 正在设置 libhtml-parser-perl (3.71-1build1) ... 正在设置 libio-html-perl (1.00-1) ... 正在设置 liblwp-mediatypes-perl (6.02-1) ... 正在设置 libhttp-message-perl (6.06-1) ... 正在设置 libhtml-form-perl (6.03-1) ... 正在设置 libhtml-tree-perl (5.03-1) ... 正在设置 libhtml-format-perl (2.11-1) ... 正在设置 libhttp-cookies-perl (6.00-2) ... 正在设置 libhttp-daemon-perl (6.01-1) ... 正在设置 libhttp-negotiate-perl (6.00-2) ... 正在设置 libintl-perl (1.23-1build1) ... 正在设置 libnet-http-perl (6.06-1) ... 正在设置 libwww-robotrules-perl (6.01-1) ... 正在设置 libtext-unidecode-perl (0.04-2) ... 正在设置 libxml-namespacesupport-perl (1.11-1) ... 正在设置 libxml-sax-base-perl (1.07-1) ... 正在设置 libxml-sax-perl (0.99+dfsg-2ubuntu1) ... update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::PurePerl with priority 10... update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... Creating config file /etc/perl/XML/SAX/ParserDetails.ini with new version 正在设置 libxml-libxml-perl (2.0108+dfsg-1ubuntu0.1) ... update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX::Parser with priority 50... update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX with priority 50... update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version 正在设置 texinfo (5.2.0.dfsg.1-2) ... Running mktexlsr. This may take some time. ... done. 正在设置 libwww-perl (6.05-2) ... 正在设置 liblwp-protocol-https-perl (6.04-2ubuntu0.1) ... 正在设置 libxml-parser-perl (2.41-1build3) ... 正在设置 libxml-sax-expat-perl (0.40-2) ... update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::Expat with priority 50... update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh http://blog.csdn.net/linuxarmsummary/article/details/12775457 msgfmt包错误 makeinfo 包错误 e.o -MD -MP -MF .deps/execute.Tpo -c -o execute.o execute.c /usr/bin/gcc -std=gnu99 -I. -O2 -I/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/include -I/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/include -MT exitfail.o -MD -MP -MF .deps/exitfail.Tpo -c -o exitfail.o exitfail.c In file included from clean-temp.h:22:0, from clean-temp.c:23: ./stdio.h:456:1: error: 'gets' undeclared here (not in a function) _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); ^ mv -f .deps/exitfail.Tpo .deps/exitfail.Po /usr/bin/gcc -std=gnu99 -I. -O2 -I/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/include -I/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/include -MT fatal-signal.o -MD -MP -MF .deps/fatal-signal.Tpo -c -o fatal-signal.o fatal-signal.c mv -f .deps/c-ctype.Tpo .deps/c-ctype.Po /usr/bin/gcc -std=gnu99 -I. -O2 -I/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/include -I/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/include -MT fd-safer-flag.o -MD -MP -MF .deps/fd-safer-flag.Tpo -c -o fd-safer-flag.o fd-safer-flag.c mv -f .deps/c-stack.Tpo .deps/c-stack.Po make[4]: *** [clean-temp.o] Error 1 make[4]: *** Waiting for unfinished jobs.... mv -f .deps/execute.Tpo .deps/execute.Po mv -f .deps/fd-safer-flag.Tpo .deps/fd-safer-flag.Po mv -f .deps/fatal-signal.Tpo .deps/fatal-signal.Po mv -f .deps/gl_avltree_oset.Tpo .deps/gl_avltree_oset.Po make[4]: Leaving directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-m4-1.4.15/lib' make[3]: *** [all] Error 2 make[3]: Leaving directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-m4-1.4.15/lib' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-m4-1.4.15' make[1]: *** [all] 错误 2 make[1]:正在离开目录 `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-m4-1.4.15' make: *** [/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-m4-1.4.15/.stamp_built] 错误 2 make:离开目录“/home/wwt/linux_r16/lichee/buildroot” ERROR: build buildroot Failed rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ find . -name stdio.in.h ./out/sun8iw5p1/linux/common/buildroot/build/host-m4-1.4.15/lib/stdio.in.h rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ Z:\home\wwt\linux_r16\lichee\out\sun8iw5p1\linux\common\buildroot\build\host-m4-1.4.15\lib\stdio.in.h // 2017/5/2 14:13 wenyuanbo add!!!! //_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16) _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #endif http://www.cnblogs.com/hjj801006/p/3988220.html 'gets' undeclared here (not in a function) rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh make[3]: Leaving directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/lib' Making install in doc make[3]: Entering directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/doc' restore=: && backupdir=".am$$" && \ am__cwd=`pwd` && CDPATH="${ZSH_VERSION+.}:" && cd . && \ rm -rf $backupdir && mkdir $backupdir && \ if (/bin/sh /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/build-aux/missing --run makeinfo --version) >/dev/null 2>&1; then \ for f in autoconf.info autoconf.info-[0-9] autoconf.info-[0-9][0-9] autoconf.i[0-9] autoconf.i[0-9][0-9]; do \ if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \ done; \ else :; fi && \ cd "$am__cwd"; \ if /bin/sh /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/build-aux/missing --run makeinfo --no-split -I . \ -o autoconf.info autoconf.texi; \ then \ rc=0; \ CDPATH="${ZSH_VERSION+.}:" && cd .; \ else \ rc=$?; \ CDPATH="${ZSH_VERSION+.}:" && cd . && \ $restore $backupdir/* `echo "./autoconf.info" | sed 's|[^/]*$||'`; \ fi; \ rm -rf $backupdir; exit $rc conftest.c:14625: must be after `@defmac' to use `@defmacx' make[3]: *** [autoconf.info] Error 1 make[3]: Leaving directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/doc' make[2]: *** [install-recursive] Error 1 make[2]: Leaving directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65' make[1]: *** [install] 错误 2 make[1]:正在离开目录 `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65' make: *** [/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/.stamp_host_installed] 错误 2 make:离开目录“/home/wwt/linux_r16/lichee/buildroot” ERROR: build buildroot Failed rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ find . -name autoconf.texi ./out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/doc/autoconf.texi rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ Z:\home\wwt\linux_r16\lichee\out\sun8iw5p1\linux\common\buildroot\build\host-autoconf-2.65\doc\autoconf.texi @r{[}@var{\varname\}@r{]}@c (修改为:) @r{[}@var{\varname\}@r{]} @r{[}@var{\varname\} = @samp{\default\}@r{]}@c (修改为:) @r{[}@var{\varname\} = @samp{\default\}@r{]} http://blog.csdn.net/laohuang1122/article/details/44098291/ Ubuntu14.04编译Allwinner lichee 两个出错解决方法 rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh libtool: install: ranlib /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/lib/libfakeroot.a libtool: finish: PATH="/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/bin:/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin:/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/external-toolchain/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/cm/cm/R58/r58_new20161012/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/arm-linux-androideabi/bin:/home/cm/cm/R58/r58_new20161012/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:/opt/jdk1.6.0_45/bin:/opt/jdk1.6.0_45/jre/bin:/sbin" ldconfig -n /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/lib ---------------------------------------------------------------------- Libraries have been installed in: /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/lib If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- test -z "/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin" || /bin/mkdir -p "/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin" /bin/sh ./libtool --mode=install /usr/bin/install -c 'faked' '/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin/faked' libtool: install: /usr/bin/install -c faked /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin/faked make[3]:正在离开目录 `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-fakeroot-1.9.5' make[2]:正在离开目录 `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-fakeroot-1.9.5' make[1]:正在离开目录 `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-fakeroot-1.9.5' rm -rf /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs mkdir /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs cp package/makedevs/makedevs.c /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs cc -Wall -Werror -O2 /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs/makedevs.c -o /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs/makedevs /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs/makedevs.c: In function ‘main’: /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs/makedevs.c:374:6: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable] int ret = EXIT_SUCCESS; ^ cc1: all warnings being treated as errors make: *** [/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs/makedevs] 错误 1 make:离开目录“/home/wwt/linux_r16/lichee/buildroot” ERROR: build rootfs Failed rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ find . -name makedevs.c ./buildroot/package/makedevs/makedevs.c ./out/sun8iw5p1/linux/common/buildroot/build/host-makedevs/makedevs.c ./out/sun8iw5p1/linux/common/buildroot/build/busybox-1.18.3/miscutils/makedevs.c rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ http://blog.csdn.net/laohuang1122/article/details/44098291/ Ubuntu14.04编译Allwinner lichee 两个出错解决方法 rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh /local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/cm/cm/R58/r58_new20161012/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/arm-linux-androideabi/bin:/home/cm/cm/R58/r58_new20161012/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:/opt/jdk1.6.0_45/bin:/opt/jdk1.6.0_45/jre/bin"" >> /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/_fakeroot.fs chmod a+x /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/_fakeroot.fs /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin/fakeroot -- /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/_fakeroot.fs rootdir=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/target table='target/generic/device_table.txt' Warning: skip syncing -d /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/target /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/images/rootfs.ext4 -N 1399 -b 42633 tune2fs 1.42.9 (4-Feb-2014) Creating journal inode: 完成 This filesystem will be automatically checked every 20 mounts or 0 days, whichever comes first. Use tune2fs -c or -i to override. e2fsck 1.42.9 (4-Feb-2014) 文件系统缺少UUID;正在生成一个。 Adding dirhash hint to 文件系统. /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/images/rootfs.ext4: clean, 1009/1440 files, 38102/42633 blocks busybox directfb directfb-examples divine dosfstools e2fsprogs ethtool ext4-utils freetype fsck-msdos fuse-exfat libfuse i2c-tools input-tools iostat iperf iw jpeg libnl libpcap libpng memstat memtester ntfs-3g openssh openssl portmap strace stress sysstat szrz tcpdump tiobench tslib udev which wireless_tools wpa_supplicant zlib target-generic-hostname target-generic-issue target-generic-getty-busybox target-finalize target-purgelocales /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/bin:/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin:/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/sbin/:/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/external-toolchain/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/cm/cm/R58/r58_new20161012/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/arm-linux-androideabi/bin:/home/cm/cm/R58/r58_new20161012/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:/opt/jdk1.6.0_45/bin:/opt/jdk1.6.0_45/jre/bin make:离开目录“/home/wwt/linux_r16/lichee/buildroot” INFO: build rootfs OK. INFO: ---------------------------------------- INFO: build lichee OK. INFO: ---------------------------------------- rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh pack INFO: packing firmware ... copying tools file copying configs file ./out/aultls32.fex ./out/aultools.fex ./out/cardscript.fex ./out/cardtool.fex ./out/diskfs.fex ./out/env_burn.cfg ./out/env.cfg ./out/image.cfg "./out/image_linux.cfg" -> "./out/image.cfg" ./out/split_xxxx.fex ./out/sys_config.fex ./out/sys_partition_dragonboard.fex ./out/sys_partition_dump.fex ./out/sys_partition.fex "./out/sys_partition_linux.fex" -> "./out/sys_partition.fex" ./out/sys_partition_private.fex ./out/sys_partition_tina.fex ./out/test_config.fex ./out/usbtool.fex ./out/usbtool_test.fex copying boot resource copying boot file packing for linux normal /home/wwt/linux_r16/lichee/tools/pack/pctools/linux/eDragonEx/ /home/wwt/linux_r16/lichee/tools/pack/out Begin Parse sys_partion.fex Add partion boot-resource.fex BOOT-RESOURCE_FEX Add partion very boot-resource.fex BOOT-RESOURCE_FEX FilePath: boot-resource.fex FileLength=453400Add partion env.fex ENV_FEX000000000 Add partion very env.fex ENV_FEX000000000 FilePath: env.fex FileLength=20000Add partion boot.fex BOOT_FEX00000000 Add partion very boot.fex BOOT_FEX00000000 FilePath: boot.fex FileLength=c5a000Add partion rootfs.fex ROOTFS_FEX000000 Add partion very rootfs.fex ROOTFS_FEX000000 FilePath: rootfs.fex FileLength=29a2400sys_config.fex Len: 0xf450 config.fex Len: 0x9ac8 split_xxxx.fex Len: 0x200 sys_partition.fex Len: 0xa80 boot0_nand.fex Len: 0x8000 boot0_sdcard.fex Len: 0x8000 u-boot.fex Len: 0xc4000 fes1.fex Len: 0x1fc0 usbtool.fex Len: 0x23000 aultools.fex Len: 0x26ead aultls32.fex Len: 0x238dd cardtool.fex Len: 0x14000 cardscript.fex Len: 0x6ea sunxi_mbr.fex Len: 0x10000 dlinfo.fex Len: 0x4000 arisc.fex Len: 0x2ed88 vmlinux.fex Len: 0x2c78baa boot-resource.fex Len: 0x453400 Vboot-resource.fex Len: 0x4 env.fex Len: 0x20000 Venv.fex Len: 0x4 boot.fex Len: 0xc5a000 Vboot.fex Len: 0x4 rootfs.fex Len: 0x29a2400 Vrootfs.fex Len: 0x4 BuildImg 0 Dragon execute image.cfg SUCCESS ! ----------image is at---------- /home/wwt/linux_r16/lichee/tools/pack/sun8iw5p1_linux_evb-30_uart0.img pack finish rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$

Unbuntu配置ftp服务

Unbuntu配置ftp服务

所有操作都是在 sudo su 下: 安装: $ sudo su 进入 # # apt-get install vsftpd # ps -e | grep ftp #查看是否启动 安装完毕后或许会自动生成一个帐户”ftp”,/home下也会增加一个文件夹。 如果没有生成这个用户的话可以手动来,生成了就不用了: 代码: sudo useradd -m ftp sudo passwd ftp

深入Intel NPU加速库:从安装到模型优化

深入Intel NPU加速库:从安装到模型优化

Intel NPU加速库教学文章 目录 1. 引言 2. 环境搭建 3. Intel DNNL基础 3.1. DNNL概述 3.2. 安装DNNL 3.3. DNNL编程模型 3.4. 实例:使用DNNL进行卷积操作 4. Intel OpenVINO Toolkit基础 4.1. OpenVINO Toolkit概述 4.2. 安装OpenVINO Toolkit 4.3. 模型优化流程 4.4. 实例:使用OpenVINO进行模型推理 5.性能分析与调优 5.1. 使用Intel VTune Profiler 5.2. 使用Intel Advisor 6.跨平台部署 6.1. 支持的硬件平台 6.2. 部署策略 7.案例研究 7.1. 案例介绍 7.2. 实现步骤 7.3. 结果分析 8.最佳实践和技巧 9.总结 10.附录 A. 术语表 B. 常见问题解答 C. 参考文献和资源

Centos 8 vsftpd多用户FTP服务器配置完美方案——同时解决PORT和PASV模式

Centos 8 vsftpd多用户FTP服务器配置完美方案——同时解决PORT和PASV模式

Centos 8 FTP服务器完美配置方案,实现多虚拟用户FTP连接,同时解决FTP PORT和PASV模式下,存在的问题。

VSFTP搭建服务

VSFTP搭建服务

·FTP搭建完全手册 虚拟用户设置 以及500错误解决

Makefile自动化编译实战项目

Makefile自动化编译实战项目

Makefile自动化编译实战项目

最新推荐最新推荐

recommend-type

研发流程后端开发工具,提示功能开发效率

后端开发工具
recommend-type

Screenshot_2026-11-03-16-23-09-34.jpg

Screenshot_2026-11-03-16-23-09-34.jpg
recommend-type

机器人具有扰动抑制功能的有限时间基于方位角的领航者-跟随者编队控制(Matlab代码实现)

内容概要:本文档标题为《Plecs全桥LLC谐振变换器仿真模型.txt》,但实际内容并未涉及该主题的具体技术细节或仿真建模过程。相反,文档实质是一份由科研服务团队发布的跨学科资源目录,集中展示了大量基于Matlab、Simulink、Python、PSCAD等平台实现的科研项目与算法开发案例,涵盖电力系统、无人机路径规划、微电网优化、状态估计、信号处理、车间调度、图像处理、通信技术、雷达追踪、智能优化算法等多个工程技术领域。每个条目以“【】”标注研究主题,并注明“Matlab代码实现”“Python代码实现”等形式,表明其为可提供技术支持与代码资源的服务项目。文档末尾频繁出现“完整资源下载:公众号——荔枝科研社”及百度网盘链接,明确体现出其作为科研辅助服务推广与引流工具的功能属性。; 适合人群:面向电气工程、自动化、控制科学与工程、计算机科学、智能制造、新能源、航空航天、通信工程及相关交叉学科的研究生、高校教师、科研人员及企业研发工程师。; 使用场景及目标:①为科研人员提供课题选题、技术路线设计与算法实现的参考范例;②辅助学生或研究人员完成课程设计、毕业论文、项目仿真与算法复现任务;③作为第三方技术服务团队的能力展示目录,便于潜在客户快速了解其在多领域提供的定制化仿真与算法开发服务范围。; 阅读建议:此文档并非传统意义上的学术论文或技术教程,而是一份高度碎片化、广告性质浓厚的资源索引清单。读者应忽略其误导性的文件名,将其视为一个综合性科研技术服务目录,重点关注自身研究方向相关的条目,并通过文末提供的公众号或网盘链接进一步获取具体代码与资料。同时,需注意甄别资源的技术质量、原创性与适用性,避免盲目依赖外部服务。
recommend-type

科技中介服务机构如何打造高效、可复制的技术交易服务流程?.docx

科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。
recommend-type

高校技术转移办公室人员如何提升科研成果的市场推广与转化成功率?.docx

科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。
recommend-type

信捷XD5 PLC控制码垛机械手实现自动化六轴编程

本文讨论了如何基于信捷XD5 PLC和威纶触摸屏编写适用于码垛机和机械手的六轴控制PLC程序,介绍了整个系统的架构与设计,并着重于操作界面与监控功能的实现。以下是对文章中涉及的关键知识点的详细介绍。 ### 信捷XD5 PLC编程基础 信捷XD5 PLC是信捷电气推出的一款可编程逻辑控制器,广泛应用于工业自动化领域。为了编写码垛机和机械手的六轴控制程序,首先需要掌握信捷XD5 PLC的基础知识,包括但不限于: - **PLC硬件结构**:了解PLC的基本组成,包括CPU模块、输入/输出模块、通讯模块等。 - **脉冲输出指令**:在控制机械手时,脉冲输出是实现精确位置控制的关键技术,需要熟练使用信捷XD5提供的脉冲输出指令进行编程。 - **编程语言**:信捷XD5 PLC支持多种编程语言,如梯形图、指令列表、结构化文本等。针对码垛机和机械手的控制,选择合适的编程语言以简化编程逻辑和提高执行效率。 - **数据处理**:了解如何在PLC程序中处理各种数据类型,包括整数、实数、字符串等,以及如何进行数据转换和运算。 ### 六轴控制系统架构 六轴控制系统是指能够控制六个自由度的机械装置的系统,如机械手。其控制系统需要对每个轴的位置、速度、加速度等进行精确控制,以确保执行的动作精确到位。在编写PLC程序时,需要考虑到以下几个方面: - **主程序框架设计**:定义整个控制程序的主体结构,包括初始化、错误处理、周期任务等。 - **手动控制子程序**:在手动模式下,需要编写能够响应操作员输入并控制机械手移动的子程序。 - **自动控制子程序**:自动模式下,需要设计能够按照预设的路径和速度控制机械手移动的子程序。 ### 威纶触摸屏人机交互设计 威纶触摸屏是工业领域常用的触摸式人机界面(HMI),它允许操作者直接与机器进行交互,方便监控和控制机器运行状态。在本项目中,威纶触摸屏的使用包括: - **操作界面设计**:设计直观易用的操作界面,包括必要的按钮、指示灯、数据显示窗口等。 - **设备状态监控**:实时显示机械手和码垛机的运行状态,包括各轴的位置、速度和状态信息。 - **人机交互实现**:通过触摸屏响应操作员的指令,如启动、停止、调整参数等,以及提供安全保护和故障诊断功能。 ### 六轴控制程序编写实践 在编写程序时,需要关注以下几个关键环节: - **程序的可靠性**:通过代码优化和测试,确保控制程序在各种工况下都能稳定运行。 - **程序的可维护性**:编写程序时应该考虑未来可能的功能扩展或修改,注释应详尽,逻辑应清晰,便于后续维护。 - **实际应用调试**:程序在实际设备上运行之前,需要进行充分的模拟和现场调试,确保满足生产需求。 ### 代码示例与注释 文章提供了详细的代码示例,这有助于读者理解如何将理论知识应用到实践中。丰富的注释不仅可以帮助读者理解代码的功能和逻辑,还能在调试时迅速定位问题。 ### 结语 综上所述,码垛机机械手六轴控制程序及PLC程序的编写需要深入理解PLC的编程原理和机械手的工作方式,并能够将这些知识融合到实际应用中。通过信捷XD5 PLC和威纶触摸屏的结合,可以实现高度自动化和智能化的生产控制。这套控制程序的成功实践不仅可以提高生产效率,还能增强设备的可靠性与操作的便捷性。对于自动化设备开发的技术人员而言,这是一份宝贵的学习材料,能够为他们的工作提供直接的技术支持和参考。
recommend-type

【Python爬虫避坑黄金法则】:23个生产环境血泪教训+17种高频报错的秒级定位方案(2024年最新版)

# 爬虫工程化落地的现实困境与认知重构 在智能终端日益普及、数据驱动决策成为企业核心能力的今天,爬虫早已不是实验室里的玩具脚本,而是支撑电商比价、金融风控、舆情监测、供应链预警等关键业务的数据动脉。但当团队把一个“能跑通”的脚本部署到生产环境,面对日均百万级请求、数十个目标站点、多层CDN/WAF防护和不断演进的法律边界时,系统往往在两周内开始失血:任务成功率从98%断崖式跌至62%,故障平均定位耗时飙升至47分钟,运维同学深夜被PagerDuty警报惊醒,却只能对着满屏`403 Forbidden`和`cf_clearance`跳转日志束手无策。 问题出在哪?不是缺工具——`reques
recommend-type

C盘快满了,想把D盘空间合并过去,但中间隔着恢复分区,该怎么安全操作?

### Windows C盘空间不足解决方案 当面对C盘空间不足的问题时,可以采取多种方式来解决问题。一种常见的做法是通过合并磁盘分区增加C盘的空间。然而,在某些情况下,如C盘和D盘之间存在其他分区(例如恢复分区),这会使得直接使用Windows自带的磁盘管理工具变得困难。 对于这种情况,推荐采用专业的第三方软件——傲梅分区助手来进行操作[^3]。该工具不仅能够处理非相邻分区之间的合并问题,还支持更多高级功能,从而提供更加灵活且安全的选择。具体来说: - **使用傲梅分区助手** 如果目标是在不损害数据的前提下完成C盘扩容,则建议下载安装最新版的傲梅分区助手。启动程序后,可以通
recommend-type

氨气催化裂解模拟研究:COMSOL在不同压力温度下的应用

在现代化学工程和催化反应研究中,氨气(NH3)催化裂解是一个关键过程,它与能源、材料、农业等多个领域密切相关。氨气催化裂解不仅可以作为氢气的一种来源,而且在合成氨、肥料制造、化工原料制备等多个环节扮演着重要角色。随着对高效、环保催化技术需求的不断增加,对氨气催化裂解过程的深入研究显得尤为重要。 COMSOL Multiphysics 是一款功能强大的多物理场模拟软件,它能够模拟和分析各种物理过程和工程问题。利用COMSOL软件对氨气催化裂解进行模拟,研究人员可以在计算机上复现反应过程,从而预测不同条件下的裂解行为,优化反应条件,并且节省了实验成本和时间。 在 COMSOL 中模拟氨气催化裂解,首先需要明确的是物理模型的建立。物理模型通常基于连续介质力学原理,包括流体动力学(流体流动)、传热学(热传递)以及化学反应动力学(催化反应速率)。为了建立模型,研究人员需要定义适当的几何结构、物理场、边界条件和初始条件。几何结构取决于所模拟反应器的具体类型,比如管式反应器或搅拌釜式反应器。物理场则是根据氨气催化裂解的原理,可能包括但不限于流体流动、传热、质量传输、多相流以及化学反应等模块。设置参数则涉及反应速率常数、活化能、热容等反应动力学和热力学数据。最后,模拟运行需要合适的求解器来解决模型中的偏微分方程组。 在COMSOL中,可以通过参数化分析功能来研究不同压力和温度对氨气催化裂解的影响。在模型中设置相应的参数范围,通过模拟运行一系列参数变化,研究者可以观察到不同条件下的裂解速率和产物分布变化。例如,增加压力通常会导致反应物分压上升,从而提高反应速率,但同时也会增加能耗。而温度则是影响反应速率的另一个重要因素,通常提高温度会加快反应速率,但是超过催化剂的最佳使用温度后,反应速率反而会下降,因为高温可能造成催化剂的失活。 在COMSOL模拟中,研究者还可以通过查看温度分布、浓度分布、流场分布等模拟结果,来直观理解在不同压力和温度条件下,氨气催化裂解过程的具体变化。此外,通过分析不同条件下的反应动力学数据,研究者可以进一步探究反应机理,进而指导实验设计。 将COMSOL模拟技术应用于氨气催化裂解的研究,不仅可以为实验提供理论指导,还能帮助研究人员在优化工艺条件方面取得突破,提高氨气催化裂解的效率和产物的纯度。随着模拟技术的发展和计算能力的提升,基于COMSOL的氨气催化裂解模拟研究将会在化学工程领域发挥越来越大的作用。
recommend-type

STOP2模式RTC唤醒失准根源锁定:电源域切换时序偏差+LSI频率漂移+备份域寄存器锁存延迟——通过CubeMX配置反推+HAL源码注释溯源+示波器捕获LSE起振全过程

# STOP2模式RTC唤醒失准问题的深度解构与鲁棒性保障体系 在工业物联网边缘节点、电池供电传感器、智能穿戴设备等对功耗与时间精度双敏感的应用场景中,STM32L4/L5系列微控制器凭借其亚毫安级STOP2待机电流(典型1.2 µA @ 3.3 V, 25°C)成为主流选择。然而,一个长期被低估却反复在量产阶段爆发的问题正悄然侵蚀着系统可靠性:**STOP2模式下RTC唤醒定时存在稳定、可复现、且与环境强相关的系统性偏差——实测达±8.7ms(标称1秒周期),低温下甚至突破±45ms阈值,直接导致边缘AI推理任务漏触发、数据采集断点、安全看门狗超时,最终引发客户批量退货。** 这不是偶发