问题标签 [libarchive]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
windows - 在 Windows Sever 2016 上使用本机 tar PowerShell cmdlet
我有一个使用 PowerShell 5.1.17763.771 在 Windows 10 设备上编写的 PowerShell 脚本。它获取 .tgz 文件的路径,将其解压缩,并将提取的文件夹放在另一个路径中。tar
它使用一两年前添加到 PowerShell的内置cmdlet 来执行此操作。它在我的机器上完全按照预期工作。
在 Windows Server 2016 上运行相同的脚本时,tar
无法识别 cmdlet。此服务器上运行的 PowerShell 版本是 5.1.14393.3471。我已经在服务器上运行了所有可以执行的 Windows 更新。如何让本机tar
cmdlet 在 Windows Server 2016 上运行?是否有我缺少的 PowerShell 更新?我可以安装包含tar
cmdlet 的 Microsoft 创建的模块吗?
c++ - 使用 libarchive 从内存中读取 zip 归档文件头
我正在尝试读取使用 libarchive 存储在内存中的 zip 文件的标题。这是我的尝试
不幸的是,archive_read_next_header 返回 -30,这意味着 zip 标头被截断。有人可以帮忙吗?
qt - Qt - 集成第三方库(libarchive)的问题
在 Qt 5.14.2 中进行整数库归档时出现错误。我在窗户上。这是错误:
在我的 main.cpp 文件中,我有:
我使用 mingw64 成功编译了 libarchive 3.4.2,但在 Qt 中对其进行整数处理时遇到了麻烦。
在我的 libarchive 文件夹中,我有:
- 包括(包含archive.h和archive_entry.h)
- lib(包含 libarchive.dll.a 和 libarchive.dll)
在我的 .pro 文件中:
但是,我仍然缺少一些东西。
你有想法吗 ?
c++ - libarchive 如何读取连接的 tar
我想读取通过使用 libarchive连接多个.tar.gz
文件制作的 tar 文件。cat one.tar.gz two.tar.gz .... > combined.tar.gz
我可以使用 a 很好地读取第一个 tar 文件的文件while(;;)
r = archive_read_next_header(a, &entry);
,但是一旦完成阅读,我就会得到一个Closing file Segmentation fault (core dumped)
如何让 libarchive 转到读取下一个 tar 文件?
macos - 如何在 macOS 上安装 libarchive 并让编译器检测到它?
我正在尝试在 macOS 上为我的学校项目安装 libarchive。我尝试使用 brew 公式来做到这一点,但 CMake 说它无法检测到它。如何以正确的方式安装 libarchive?
我尝试了什么:
brew install libarchive
我在 CLion 中得到了什么:
c++ - 如何在我的源代码中包含外部库的头文件?
我正在尝试使用 Libarchive 在我的项目中提取存档文件。在独立代码中,我使用以下方法包含 libarchive 的 archive.h:
#include <archive.h>
但是我在项目中看到不直接包含头文件,它们使用:
#include <poppler/cpp/poppler-document.h>
为什么不直接包含 poppler-document.h?那么这些目录是如何指定的呢?
c++ - 在 macOS High Sierra 10.13.6 上编译 Ardor 时“未找到”libarchive
我正在尝试在 macOS High Sierra 10.13.6 上编译Ardor (6.0.0) 的稳定版本,我已通过git clone https://github.com/boostorg/boost.git
. 我已经设法解决了前几个依赖项,但现在我坚持通过 Ardor 检测libarchive。我还安装了最新版本的 Homebrew (2.3.0)。
当我运行sudo ./waf configure --boost-include=/usr/local/boost-1.73.0/include CXX=g++-9 CC=gcc-9
编译 Ardour 时,输出如下:
这是 Ardor 的输出build/config.log
:
libarchive pkgconfig 目录确实包含以下libarchive.pc
文件:
我已经通过 homebrew 安装了最新版本的 libarchive 3.4.3,将 libarchive pkgconfig 路径添加到 PKG_CONFIG_PATH 环境变量以及来自 libarchive homebrew install 的其他说明:
libarchive 是仅限 keg 的,这意味着它没有符号链接到 /usr/local,因为 macOS 已经提供了这个软件,并且并行安装另一个版本可能会导致各种麻烦。
如果您需要在 PATH 运行中首先使用 libarchive: echo 'export PATH="/usr/local/opt/libarchive/bin:$PATH"' >> /Users/kjesso/.bash_profile
要让编译器找到 libarchive,您可能需要设置: export LDFLAGS="-L/usr/local/opt/libarchive/lib" export CPPFLAGS="-I/usr/local/opt/libarchive/include"
要让 pkg-config 找到 libarchive,您可能需要设置:export PKG_CONFIG_PATH="/usr/local/opt/libarchive/lib/pkgconfig"
PKG_CONFIG_PATH 环境变量的输出:
该路径/usr/local/opt/libarchive
是一个符号链接/usr/local/Cellar/libarchive/3.4.3/
:
我在网上搜索过,但没有发现任何有用的东西。任何人都知道为什么 Ardor 没有检测到 libarchive 的最新版本 3.4.3?
c++ - archive_read_support_filter_all() 有什么作用?
如果合适的库在构建时不可用,archive_read_support_filter_all()使代码能够使用外部程序。(参见https://www.freebsd.org/cgi/man.cgi?query=archive_read_support_filter_all&sektion=3&apropos=0&manpath=FreeBSD%2B10.0-RELEASE)。
但是libarchive ( https://github.com/libarchive/libarchive/wiki/Examples ) 本身从各种格式中提取数据,这个功能是 libarchive 的一部分。那么什么时候应该使用它,它有什么作用呢?
和有什么区别
- archive_read_support_format_all() ( https://manpages.debian.org/testing/libarchive-dev/archive_read_format.3.en.html )
- archive_read_support_filter_all()
我正在使用 Libarchive 从 ODF 文件中提取数据,我在 Libarchive 的文档和示例中遇到了这个函数,但不确定这个函数的用途。
c++ - 正在解压缩和提取空文件
我使用以下格式压缩了几个文件,并在 linux 环境中通过 libarchive 进行过滤
存档和压缩成功,当我使用 7z 工具在 windows 中提取和解压缩文件时,我看到一些文件是空的。任何人都可以帮我解决这个 libarchive 版本:3.3.2