我有一个 Ubuntu 10.04 LTS 服务器,我想在上面编译 postgres 的最小安装。使用最小安装服务器没有 gcc 所以我不得不做一个apt-get install gcc但现在我不断从 postgres 收到这个错误./configure。
configure: error: readline library not found
Run Code Online (Sandbox Code Playgroud)
我似乎找不到包含 readline 库的包的名称。所以我有两个问题。
我已经阅读了关于像 Gentoo 这样的基于源代码的 linux 发行版与像 Ubuntu 这样的预构建发行版相比如何有相当大的性能提升,因为它们从源代码安装并针对您的特定系统进行了优化。是否可以从源代码构建 Ubuntu 以获得同样的好处?
使用该apt-get install方法将包安装到 ubuntu 时,获取该包的源代码和从头开始构建它之间有什么根本区别吗?该apt-get install功能是简单地下载源代码并将其构建到您的计算机上的指定目录中,还是在幕后进行更多操作?
最后(也许这没有答案)一种方法比另一种更好吗?我在这里要讨论的是,从源代码自己构建它是否有任何优势,还是让它apt-get做它的事情更好?
用过的
./configure DFLAGS="-03"
Run Code Online (Sandbox Code Playgroud)
这是 config.log
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... …Run Code Online (Sandbox Code Playgroud) 我想获取一个项目的源代码,然后以与 apt 相同的方式构建它。例如,我想要工作源代码并且能够在源代码上运行“make”或类似的命令。
我怎样才能做到这一点?
具体来说,我想得到这个源“icedtea-6-jre-jamvm”
在 Linux 机器上使用带有 bash、gcc(3 或 4 系列)、make 等的通用 C 开发环境构建它。
建筑先决条件是:
**
Run Code Online (Sandbox Code Playgroud)1. openssl binaries; 2. openssl development package with include files (on debian package libssl-dev);**
我是新手,但很冒险。我正在三启动 Windows、Fedora 和 Ubuntu 14.04 LTS(全部 64 个)。学习但不使用 dpkg、apt 和 apt-get。开始使用 Ubuntu 学习 C++(唯一安装了 gcc 的)。所以在我第一次尝试编译时,我运行了命令gcc xy.cc并得到以下结果:
gcc: error trying to exec 'cc1plus' : execvp: No such file or directory
Run Code Online (Sandbox Code Playgroud)
所以我在我的电脑上搜索了 cc1plus 和 execvp。并没有找到。只是 execvp.3.gz 在目录/user/share/man/man3和 cc1 在/user/lib/gcc/x86_64-linux-gnu/4.8.
所以大量的工作和学习包的吸气剂和检查器,但没有勇气删除和重新安装等。
你有什么建议吗?
我正在尝试使用 make 命令来构建。我正在关注这个。我正在使用 GTK+2 和 C 语言编译代码
hp@ubuntu:~/amhello$ make
make all-recursive
make[1]: Entering directory `/home/hp/amhello'
Making all in src
make[2]: Entering directory `/home/hp/amhello/src'
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
main.c:3:20: fatal error: gtk/gtk.h: No such file or directory
compilation terminated.
make[2]: *** [main.o] Error 1
make[2]: Leaving directory `/home/hp/amhello/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/hp/amhello'
make: *** [all] Error 2
Run Code Online (Sandbox Code Playgroud)
这是 main.c 代码
#include<config.h>
#include<stdio.h> …Run Code Online (Sandbox Code Playgroud) 我已经阅读了很多类似问题的线程,但是在阅读答案后,我很困惑。我在其中发现了很多带有存储库的 url,但是人们讨论了为一两个版本的 ubuntu 制作了哪些存储库,但我没有发现关于 11.10 版本的任何信息。提出这个要求是不是太早了?我应该降级我的 ubuntu 以获得实时内核吗?
我一直很高兴在我的 Ubuntu 20.04 上安装 5.10 主线内核(来自https://kernel.ubuntu.com/~kernel-ppa/mainline/)。
在尝试更新到 5.10.33 时,我发现该包对 libc >=2.33(焦点位于 2.31)存在不受欢迎的依赖性-headers(虽然不是图像本身——但谁不想没有头文件)。
AFAIK,libc6 几乎不可能升级。是这个吗?除非我放弃 LTS,否则我会停留在 5.10.32 吗?这些人甚至有一个可以报告错误的面向公众的网站吗?
更新:这似乎是主要的启动板错误。一件好事:tuxinvader提出了一个Docker 容器(来自 Github:focal-mainline-builder)用于构建内核主线映像并将 5.10 - 5.12 包上传到他的 PPA:
提示:要查看您选择的系列/版本范围的所有可用 linux 软件包,在弄乱 PPA 和 Debian 向后移植、xanmod 等(如我所见)之后,请执行以下操作
apt update
printf '%s\0' linux-{image-unsigned,headers,modules}-5.10.{32..40} |
xargs -0 -n 1 apt-cache pkgnames | LC_ALL=C sort | less
Run Code Online (Sandbox Code Playgroud)
希望这个问题会消失。但是让我们面对现实吧,根据“内核主线 PPA”(或它背后的任何人,我仍然不明白如何接触到这些开发人员)的突发奇想,对于二进制文件并不是一种愉快的体验。