Tag: 编译

编译Linux内核会使操作系统更快吗?

编译下载的Linux内核(例如3.2)是否会使该特定计算机上的操作系统(例如ubuntu)更快?

“/ usr / bin / ld:找不到-lcudart”

我是Ubuntu的新手,使用64位的Ubuntu 14.04。 我想make一个使用cuda和opencv的项目我在运行cmake . && make时遇到以下错误cmake . && make cmake . && make Linking CXX executable ground_estimation /usr/bin/ld: cannot find -lcudart collect2: error: ld returned 1 exit status make[2]: *** [ground_estimation] Error 1 make[1]: *** [CMakeFiles/ground_estimation.dir/all] Error 2 make: *** [all] Error 2 这是ld -lcudart –verbose attempt to open /usr/x86_64-linux-gnu/lib64/libcudart.so failed attempt to open /usr/x86_64-linux-gnu/lib64/libcudart.a […]

Ubuntu在哪里存储其库文件?

我想添加我自己的库以用于c编译,但是不知道ubuntu在哪里存储它。

我如何设置ccache?

我想使用ccache来加速编译。 我遇到了如何启用ccache 这是我到目前为止所做的: $ sudo apt-get install -y ccache $ dpkg -l ccache ii ccache 3.1.6-1 Compiler cache for fast recompilation of C/C++ code $ whereis ccache ccache: /usr/bin/ccache /usr/lib/ccache /usr/bin/X11/ccache /usr/share/man/man1/ccache.1.gz 我通过添加到~/.bashrc将ccache添加到路径中 $ export PATH=”/usr/lib/ccache:$PATH” $ source ~/.bashrc $ echo $PATH /usr/lib/ccache:/usr/local/cuda-5.5/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games 符号链接看起来很好: $ ll /usr/lib/ccache/ total 76 drwxr-xr-x 2 root root 4096 mai […]

如何在构建包时解决dpkg-source source问题?

有没有人有一些创建Debian / Ubuntu包的经验? 我正在尝试将来自Ubuntu 12.10(Quantal)的lammps软件包( http://packages.ubuntu.com/quantal/lammps )移植到Ubuntu 12.04 我只是非正式地需要它 – 在创建用于部署到IaaS平台的自定义虚拟机映像时,为了方便起见,只需要一个.deb包。 按照Ubuntu包装指南( https://wiki.ubuntu.com/PackagingGuide) ,我可以成功构建,除非我尝试使用debuild命令重建,我通常会收到此错误: dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/lammps_0~20120615.gite442279-1.diff.aie32n dpkg-source: info: you can integrate the local changes with dpkg-source –commit dpkg-buildpackage: error: dpkg-source –include-binaries -i -b lammps-0~20120615.gite442279 gave error exit status 2 在src目录中运行’make clean-all’仍然无法解决问题。 有没有办法彻底清除在构建过程中生成的所有文件,或者要求debuild忽略源文件中的任何差异?

尝试在QtProject中调试时收到错误

我安装了最新版本的QtProject ,现在我可以调试C++代码了。 在第一次尝试调试时遇到了这个错误: ptrace: Operation not permitted. Could not attach to the process. Make sure no other debugger traces this process. Check the settings of /proc/sys/kernel/yama/ptrace_scope For more details, see /etc/sysctl.d/10-ptrace.conf

如何安装glib?

我想在Ubuntu 11.04中构建Empathy。 当我按照构建过程, ./autogen.sh 贝壳对我说 libtoolize: copying file `m4/lt~obsolete.m4′ checking for autoconf >= 2.53… testing autoconf2.50… not found. testing autoconf… found 2.67 checking for automake >= 1.9… testing automake-1.11… found 1.11.1 checking for libtool >= 1.5… testing libtoolize… found 2.2.6b checking for glib-gettext >= 2.2.0… testing glib-gettextize… not found. ***Error***: You must have glib-gettext >= […]

如何构建没有sudo权限的应用程序?

我需要在Ubuntu 9.10服务器上设置什么,以便用户可以构建所选择的应用程序(即./configure,make&&make install),而不需要sudo / admin权限。 我只是觉得有一点安全风险,不得不让用户访问他们可能不需要的系统部分来构建应用程序。

在$ PATH中找不到可接受的C编译器

我想安装一个名为speech_tools-2.1-release.tar.gz软件包。 在我运行此包中的命令./configure后,它会显示一条消息: Configure: error: no acceptable C compiler found in $PATH See ‘config.log’ for more details 我该怎么办?

编译OpenGL程序(缺少GL / gl.h)

我是一个完整的Linux / Ubuntu菜鸟,所以我为这个问题的任何愚蠢部分道歉或跟进。 我正在尝试将我的软件工程类组编写的程序写入我的家用计算机。 在学校,我们有Linux,它将在那里编译和运行。 我下载了VMWare,在虚拟机上安装了Ubuntu,现在我正试图让我的程序打开。 但是,当我尝试运行我的make文件时,我收到一条错误消息 gcc -I../include -pthread -O1 -c rain.c In file included from rain.c:19:0: ../include/GL/glfw.h:176:21: fatal error: GL/gl.h: No such file or directory compilation terminated. make: *** [rain.o] Error 1 有人会碰巧知道为什么它不能找到这个文件,什么时候它可以在我的学校电脑上? 我需要做些什么来下载它或者把它放到正确的位置?