sách gpt4 ai đã đi

static-libraries - 没有可用的包 glibc-static

In lại 作者:行者123 更新时间:2023-12-04 08:34:37 33 4
mua khóa gpt4 Nike

我试图在编译 C++ 程序时静态链接库。
g++ (GCC) 4.8.5 20150623(红帽 4.8.5-4)

$ g++ -std=c++11 -I/home/jerry/Desktop/tiny-dnn -m32 -pthread -static train.cpp -o train
/usr/bin/ld: cannot find -lstdc++
/usr/bin/ld: cannot find -lm
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lc
collect2: lỗi: ld trả về 1 trạng thái thoát

我找到了这个帖子
( /usr/bin/ld: cannot find -lc while compiling with makefile ) 表示要安装 glibc-static。
bash-4.2# sudo yum install glibc-static
Loaded plugins: langpacks
ol7_UEKR3 | 1.2 kB 00:00:00
ol7_latest | 1.4 kB 00:00:00
No package glibc-static available.
Error: Nothing to do
bash-4.2# yum info glibc-static
Loaded plugins: langpacks
Error: No matching Packages to list
bash-4.2# yum search glibc
Loaded plugins: langpacks
================================================== N/S matched: glibc ===================================================
glibc-common.x86_64 : Common binaries and locale data for glibc
compat-glibc.x86_64 : Compatibility C library
compat-glibc-headers.x86_64 : Header files for development using standard C libraries.
glibc.i686 : The GNU libc libraries
glibc.x86_64 : The GNU libc libraries
glibc-devel.i686 : Object files for development using standard C libraries.
glibc-devel.x86_64 : Object files for development using standard C libraries.
glibc-headers.x86_64 : Header files for development using standard C libraries.
glibc-utils.x86_64 : Development utilities from GNU C library
kdesdk-kmtrace.x86_64 : Assist with malloc debugging using glibc's "mtrace" functionality
kernel-headers.x86_64 : Header files for the Linux kernel for use by glibc
latrace.i686 : LD_AUDIT feature frontend for glibc 2.4+
latrace.x86_64 : LD_AUDIT feature frontend for glibc 2.4+

Name and summary matches only, use "search all" for everything.

如何安装 glibc-static?请帮忙。

Cảm ơn.

1 Câu trả lời

glibc-static仅在可选 channel 中可用。可选 channel 中的 RPM 包是官方不支持的,这就是默认情况下不启用这些 channel 的原因。

启用可选 channel 的确切命令取决于产品变体。就像是

subscription-manager repos --enable=rhel-7-server-optional-rpms

可以工作,但细节取决于您的环境(此时它更像是系统管理员而不是编程问题)。

注: Red Hat 不支持静态链接的原因有很多。你真的应该避免它。

关于static-libraries - 没有可用的包 glibc-static,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44275897/

33 4 0
Bài viết được đề xuất: windows-services - 运行 Installutil 以在共享文件夹上安装 Windows 服务
Bài viết được đề xuất: r - 实时运行 Shiny 的R renderPlots
Bài viết được đề xuất: apache-zookeeper - Zookeeper 整体数据大小限制
Bài viết được đề xuất: rx-java - 速率限制 observables
行者123
Hồ sơ cá nhân

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá Didi Taxi miễn phí
Mã giảm giá Didi Taxi
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com