AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[compiling](ubuntu)

Martin Hope
Anton Samokat
Asked: 2024-08-05 15:33:54 +0800 CST

如何编译和安装最新的 qpdfview pdf 阅读器?

  • 5

我的系统环境是Ubuntu 20.04。我从以下网址下载了最新的源代码qpdfview(截至目前为 0.5 版本):https://launchpad.net/qpdfview/+download

文件中的安装说明README:

它依赖于 libQtCore、libQtGui。它还依赖于 libQtSvg、libQtSql、libQtDBus、libcups 和 libz(如果启用了 SVG、SQL、D-Bus、CUPS 和 SyncTeX 支持)。它还依赖于 libmagic(如果使用 Qt 版本 4 并且启用了 libmagic 支持)。PDF 插件依赖于 libQtCore、libQtXml、libQtGui 和 libpoppler-qt4 或 libpoppler-qt5)。PS 插件依赖于 libQtCore、libQtGui 和 libspectre。DjVu 插件依赖于 libQtCore、libQtGui 和 libdjvulibre。Fitz 插件依赖于 libQtCore、libQtGui 和 libmupdf。

由于缺乏维护者,Fitz 插件目前被视为实验性的。它还缺乏对各种功能的支持,例如元数据、加密、文本搜索、文本提取、表单字段和注释。

它是使用“lrelease qpdfview.pro”、“qmake qpdfview.pro”和“make”构建的。它是使用“make install”安装的。安装路径在“qpdfview.pri”中定义。

已安装的Qt5工具和依赖项qpdfview:

sudo apt install libcups2-dev libmupdf-dev libdjvulibre-dev libspectre-dev libpoppler-qt5-dev qttools5-dev-tools qtbase5-dev qt5-qmake cmake

pwdfview使用以下命令进行编译:

lrelease qpdfview.pro
qmake qpdfview.pro
make

最后一个make命令产生以下带有错误的输出:

qpdfview-0.5$ make

( test -e Makefile.pdf-plugin || /usr/lib/qt5/bin/qmake -o Makefile.pdf-plugin qpdfview-0.5/pdf-plugin.pro ) && make -f Makefile.pdf-plugin 
make[1]: Entering directory 'qpdfview-0.5'
make[1]: Nothing to be done for 'first'.
make[1]: Leaving directory 'qpdfview-0.5'
( test -e Makefile.ps-plugin || /usr/lib/qt5/bin/qmake -o Makefile.ps-plugin qpdfview-0.5/ps-plugin.pro ) && make -f Makefile.ps-plugin 
make[1]: Entering directory 'qpdfview-0.5'
make[1]: Nothing to be done for 'first'.
make[1]: Leaving directory 'qpdfview-0.5'
( test -e Makefile.djvu-plugin || /usr/lib/qt5/bin/qmake -o Makefile.djvu-plugin qpdfview-0.5/djvu-plugin.pro ) && make -f Makefile.djvu-plugin 
make[1]: Entering directory 'qpdfview-0.5'
make[1]: Nothing to be done for 'first'.
make[1]: Leaving directory 'qpdfview-0.5'
( test -e Makefile.image-plugin || /usr/lib/qt5/bin/qmake -o Makefile.image-plugin qpdfview-0.5/image-plugin.pro ) && make -f Makefile.image-plugin 
make[1]: Entering directory 'qpdfview-0.5'
make[1]: Nothing to be done for 'first'.
make[1]: Leaving directory 'qpdfview-0.5'
( test -e Makefile.application || /usr/lib/qt5/bin/qmake -o Makefile.application qpdfview-0.5/application.pro ) && make -f Makefile.application 
make[1]: Entering directory 'qpdfview-0.5'
g++ -Wl,-O1 -o qpdfview objects/settings.o objects/pluginhandler.o objects/shortcuthandler.o objects/rendertask.o objects/tileitem.o objects/pageitem.o objects/thumbnailitem.o objects/presentationview.o objects/searchmodel.o objects/searchitemdelegate.o objects/searchtask.o objects/miscellaneous.o objects/documentlayout.o objects/documentview.o objects/printdialog.o objects/settingsdialog.o objects/fontsdialog.o objects/helpdialog.o objects/recentlyusedmenu.o objects/recentlyclosedmenu.o objects/bookmarkmenu.o objects/bookmarkdialog.o objects/bookmarkmodel.o objects/database.o objects/mainwindow.o objects/application.o objects/main.o objects/synctex_parser.o objects/synctex_parser_utils.o objects/signalhandler.o objects/qrc_icons.o objects/moc_settings.o objects/moc_model.o objects/moc_pluginhandler.o objects/moc_shortcuthandler.o objects/moc_rendertask.o objects/moc_pageitem.o objects/moc_thumbnailitem.o objects/moc_presentationview.o objects/moc_searchmodel.o objects/moc_searchitemdelegate.o objects/moc_searchtask.o objects/moc_miscellaneous.o objects/moc_documentview.o objects/moc_printdialog.o objects/moc_settingsdialog.o objects/moc_fontsdialog.o objects/moc_helpdialog.o objects/moc_recentlyusedmenu.o objects/moc_recentlyclosedmenu.o objects/moc_bookmarkmodel.o objects/moc_bookmarkmenu.o objects/moc_bookmarkdialog.o objects/moc_database.o objects/moc_mainwindow.o objects/moc_application.o objects/moc_signalhandler.o   -lz /usr/lib/x86_64-linux-gnu/libQt5PrintSupport.so /usr/lib/x86_64-linux-gnu/libQt5Svg.so /usr/lib/x86_64-linux-gnu/libQt5Widgets.so /usr/lib/x86_64-linux-gnu/libQt5Gui.so /usr/lib/x86_64-linux-gnu/libQt5Concurrent.so /usr/lib/x86_64-linux-gnu/libQt5Sql.so /usr/lib/x86_64-linux-gnu/libQt5DBus.so /usr/lib/x86_64-linux-gnu/libQt5Core.so /usr/lib/x86_64-linux-gnu/libGL.so -lpthread   
/usr/bin/ld: objects/documentview.o: in function `qpdfview::DocumentView::printUsingCUPS(QPrinter*, qpdfview::PrintOptions const&, int, int)':
documentview.cpp:(.text+0xb56a): undefined reference to `cupsGetDests'
/usr/bin/ld: documentview.cpp:(.text+0xb5ab): undefined reference to `cupsGetDest'
/usr/bin/ld: documentview.cpp:(.text+0xb65a): undefined reference to `cupsAddOption'
/usr/bin/ld: documentview.cpp:(.text+0xb769): undefined reference to `cupsAddOption'
/usr/bin/ld: documentview.cpp:(.text+0xb803): undefined reference to `cupsAddOption'
/usr/bin/ld: documentview.cpp:(.text+0xb88b): undefined reference to `cupsAddOption'
/usr/bin/ld: documentview.cpp:(.text+0xb8d3): undefined reference to `cupsAddOption'
/usr/bin/ld: documentview.cpp:(.text+0xb961): undefined reference to `cupsGetOption'
/usr/bin/ld: documentview.cpp:(.text+0xb9e7): undefined reference to `cupsGetOption'
/usr/bin/ld: documentview.cpp:(.text+0xba50): undefined reference to `cupsAddOption'
/usr/bin/ld: documentview.cpp:(.text+0xba90): undefined reference to `cupsGetOption'
/usr/bin/ld: documentview.cpp:(.text+0xbd1b): undefined reference to `cupsPrintFile'
/usr/bin/ld: documentview.cpp:(.text+0xbdd1): undefined reference to `cupsFreeDests'
/usr/bin/ld: documentview.cpp:(.text+0xbdde): undefined reference to `cupsFreeOptions'
/usr/bin/ld: documentview.cpp:(.text+0xbdfa): undefined reference to `cupsFreeDests'
/usr/bin/ld: documentview.cpp:(.text+0xbe07): undefined reference to `cupsFreeOptions'
/usr/bin/ld: documentview.cpp:(.text+0xbe69): undefined reference to `cupsGetPPD'
/usr/bin/ld: documentview.cpp:(.text+0xbe7f): undefined reference to `ppdOpenFile'
/usr/bin/ld: documentview.cpp:(.text+0xbe9c): undefined reference to `ppdFindOption'
/usr/bin/ld: documentview.cpp:(.text+0xbf0a): undefined reference to `cupsAddOption'
/usr/bin/ld: documentview.cpp:(.text+0xbf17): undefined reference to `ppdClose'
/usr/bin/ld: documentview.cpp:(.text+0xbf81): undefined reference to `cupsAddOption'
/usr/bin/ld: documentview.cpp:(.text+0xbfa5): undefined reference to `cupsAddOption'
/usr/bin/ld: documentview.cpp:(.text+0xbfcd): undefined reference to `cupsAddOption'
/usr/bin/ld: documentview.cpp:(.text+0xc099): undefined reference to `cupsAddOption'
/usr/bin/ld: documentview.cpp:(.text+0xc29d): undefined reference to `cupsAddOption'
/usr/bin/ld: objects/documentview.o:documentview.cpp:(.text+0xc2c5): more undefined references to `cupsAddOption' follow
/usr/bin/ld: objects/documentview.o: in function `qpdfview::DocumentView::printUsingCUPS(QPrinter*, qpdfview::PrintOptions const&, int, int)':
documentview.cpp:(.text+0xc518): undefined reference to `cupsLastErrorString'
/usr/bin/ld: documentview.cpp:(.text+0xc657): undefined reference to `cupsLastErrorString'
/usr/bin/ld: documentview.cpp:(.text+0xc6e1): undefined reference to `cupsFreeDests'
/usr/bin/ld: documentview.cpp:(.text+0xc788): undefined reference to `cupsAddOption'
/usr/bin/ld: objects/documentview.o: in function `qpdfview::DocumentView::printUsingCUPS(QPrinter*, qpdfview::PrintOptions const&, int, int) [clone .cold]':
documentview.cpp:(.text.unlikely+0x955): undefined reference to `ppdClose'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile.application:358: qpdfview] Error 1
make[1]: Leaving directory 'qpdfview-0.5'
make: *** [Makefile:164: sub-application-pro-make_first-ordered] Error 2

根据这个答案,问题似乎出在源代码中。但我不确定。可能是我错过了一些额外的依赖项。将继续调查,但可能有人已经成功编译了这个程序?

compiling
  • 1 个回答
  • 35 Views
Martin Hope
Adolph Beyerlein
Asked: 2024-07-30 09:20:33 +0800 CST

应用格林函数法计算量子浓缩咖啡和交换主代码交换能量的问题

  • 6

我正在尝试使用 Dm M. Korotin 等人在 Phys. Rev. B 91, 224405 (2015) 中提出的格林函数法计算结晶镍 (Ni) 化合物的交换常数。这是通过 quantum-espresso 和代号为 exchange-master 的组合实现的。但是,当我从https://github.com/dkorotin/exchanges下载 exchange-master并将其放在我的主目录中时,exchanges-master 不会编译(使用命令make),因为出现类似 的错误undefined reference to ‘omp_get_thread_num’。

具体来说,我使用的计算机是新的:

  • 这是一款 HP envy 产品,配备 i9 英特尔核心和 64 GB 内存。
  • gfortran代码是最新版本GNU Fortran(Ubuntu11.4.0-1ubuntu1-22.04 11.4.0)。
  • 还安装了最新版本的 lapack 和 blas。

在 exchange-master 目录中,唯一需要做的准备是使用 vim 编辑器在 Makefile 中指定 gfortran 和 lapack 包。完成此操作后,就可以使用 进行编译了make,它应该生成exchanges.x执行 Greens 函数计算的程序。然而,得到的却是:

(i) gfortran   -o exchanges.x exchanges.o parameters.o general.o iomodule.o find_nnbrs.o green_function.o -L/usr/local/opt/lapack/lib/ -llapack -lblas
(ii) /usr/bin/ld: exchanges.o: in function `MAIN__':
(iii) /mnt/c/Users/adolp/exchanges-master/exchanges.f90:61: undefined reference to `omp_get_max_threads_'
 `compute_g_._omp_fn.0':
(iv) /mnt/c/Users/adolp/exchanges-master/green_function.f90:23: undefined reference to `omp_get_num_threads'
(v) /usr/bin/ld: /mnt/c/Users/adolp/exchanges-master/green_function.f90:23: undefined reference to `omp_get_thread_num'
(vi) /usr/bin/ld: /mnt/c/Users/adolp/exchanges-master/green_function.f90:23: undefined reference to `GOMP_barrier'
(vii)/usr/bin/ld: green_function.o: in function `compute_g_':
(viii) /mnt/c/Users/adolp/exchanges-master/green_function.f90:21: undefined reference to `GOMP_parallel'
collect2: error: ld returned 1 exit status
make: *** [Makefile:28: exchanges.x] Error 1
Note the compilation is OK with our choices made in the Makefile (see line (i) above).  The difficulty begins when it compiles the greens function calculation with 
‘/usr/bin/id: exchanges.oi in function  ‘MAIN_’

所有错误都与 OMP 和 GOMP 有关。人们可能首先认为解决方案是通过禁用并行处理和 openmp 来编译 Quantum expresso。但是,我已经以各种方式编译了 QE。'exchanges-master' 似乎在操作上与 quantum espresso 完全独立。QE 的唯一作用是为 exchange.x 提供输入数据,这是从 exchange-master 编译后获得的工作包make。

出现错误的文件位于 exchange-master 目录中,其位置(即文件行)与上面 (ii) 至 (viii) 中列出的错误一起给出。由于这些文件是执行计算所必需的,因此无法避免在代码中给出与 OMP 和 GOMP 相关的命令。似乎唯一能做的就是明确定义它们的用途。但是,没有关于如何做到这一点的说明。另一个可能的、也许更可能的解决方案是使用早期版本的 exchange-master,它可能没有引用 OMP 和 GOMP。但是早期版本未在 Github 上列出。

compiling
  • 1 个回答
  • 221 Views
Martin Hope
DanW58
Asked: 2024-05-10 00:38:39 +0800 CST

问题构建plib... ./configure 没有检测到OpenGL

  • 5

plib软件包仅作为源代码分发,我正在严格遵循安装说明;我相信我已经获得了所有必要的依赖项,但当我运行./configure时,它说没有工作的GL库。

这对我来说非常奇怪,因为我已经安装了libglut-dev和libglut3.12,以及freeglut3-dev和所有mesa包。

以下是完整的输出:

danw58@danw58-MS-7E12:~/Downloads/zip/plib/plib-1.8.5$ ./autogen.sh
运行aclocal
aclocal:警告:autoconf输入应命名为'configure.ac',而不是'configure.in'
运行automake
automake:警告:autoconf输入应命名为'configure.ac',而不是'configure.in'
configure.in:14:警告:AM_INIT_AUTOMAKE:两参数和三参数形式已弃用。有关更多信息,请参见:
configure.in:14:https://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
configure.in:34:正在安装'./compile'
src/fnt/Makefile.am:9:警告:'INCLUDES'是'AM_CPPFLAGS'(或'*_CPPFLAGS')的旧名称
automake:警告:autoconf输入应命名为'configure.ac',而不是'configure.in'
src/js/Makefile.am:11:警告:'INCLUDES'是'AM_CPPFLAGS'(或'*_CPPFLAGS')的旧名称
src/net/Makefile.am:11:警告:'INCLUDES'是'AM_CPPFLAGS'(或'*_CPPFLAGS')的旧名称
src/psl/Makefile.am:15:警告:'INCLUDES'是'AM_CPPFLAGS'(或'*_CPPFLAGS')的旧名称
src/puAux/Makefile.am:23:警告:'INCLUDES'是'AM_CPPFLAGS'(或'*_CPPFLAGS')的旧名称
src/pw/Makefile.am:9:警告:'INCLUDES'是'AM_CPPFLAGS'(或'*_CPPFLAGS')的旧名称
src/sg/Makefile.am:11:警告:'INCLUDES'是'AM_CPPFLAGS'(或'*_CPPFLAGS')的旧名称
src/sl/Makefile.am:15:警告:'INCLUDES'是'AM_CPPFLAGS'(或'*_CPPFLAGS')的旧名称
src/ssg/Makefile.am:32:警告:'INCLUDES'是'AM_CPPFLAGS'(或'*_CPPFLAGS')的旧名称
src/ssgAux/Makefile.am:34:警告:'INCLUDES'是'AM_CPPFLAGS'(或'*_CPPFLAGS')的旧名称
运行autoconf
configure.in:14:警告:AM_INIT_AUTOMAKE:两参数和三参数形式已弃用。
./lib/autoconf/general.m4:2434:AC_DIAGNOSE是从...aclocal.m4:429:AM_INIT_AUTOMAKE展开的...
configure.in:14:顶层
configure.in:309:警告:宏`AC_HEADER_STDC'已过时。
configure.in:309:您应该运行autoupdate。
./lib/autoconf/headers.m4:704:AC_HEADER_STDC是从...
configure.in:309:顶层
configure.in:377:警告:宏`AC_TRY_COMPILE'已过时。
configure.in:377:您应该运行autoupdate。
./lib/autoconf/general.m4:2847:AC_TRY_COMPILE是从...
configure.in:377:顶层
configure.in:377:警告:宏`AC_TRY_COMPILE'已过时。
configure.in:377:您应该运行autoupdate。
./lib/autoconf/general.m4:2847:AC_TRY_COMPILE是从...
lib/m4sugar/m4sh.m4:692:_AS_IF_ELSE是从...
lib/m4sugar/m4sh.m4:699:AS_IF是从...
./lib/autoconf/general.m4:2823:_AC_COMPILE_IFELSE是从...
./lib/autoconf/general.m4:2839:AC_COMPILE_IFELSE是从...
./lib/autoconf/general.m4:2847:AC_TRY_COMPILE是从...
configure.in:377:顶层
configure.in:394:警告:AC_OUTPUT应该不带参数使用。
configure.in:394:您应该运行autoupdate。
======================================
现在您已准备好运行'./configure'
======================================
danw58@danw58-MS-7E12:~/Downloads/zip/plib/plib-1.8.5$ ./configure
检查BSD兼容的安装... /usr/bin/install -c
检查构建环境是否
                                                    
compiling
  • 1 个回答
  • 40 Views
Martin Hope
John Dallman
Asked: 2024-01-17 06:10:25 +0800 CST

如何使用比系统运行时支持更高版本的 GCC?用它构建的软件可以在仅安装普通软件包的系统上运行吗?

  • 9

我不太使用 Ubuntu,作为一个主要是红帽企业及其类似组织的组织中的平台和构建工程师。

仅仅构建和使用最新的 GCC 的问题是语言运行时库。我要么必须分发它们,使运输复杂化并使律师对 GPL 感到紧张,要么要求我的客户构建和安装相同的 GCC。

我生产闭源商业软件,主要是数学建模,从 C 和 C++ 源代码编译并作为共享库提供。这意味着我对实现跨发行版二进制兼容性非常感兴趣。这是实用的,因为我的库所需的一切都可以从 glibc 和 GCC 语言运行时(libgcc_s.so.1和libstdc++.so.6)获得。这两组库都具有非常强的向前兼容性,因为它们的所有符号都经过版本控制,并且每次行为发生变化时都会创建新版本。

目前,我在 RHEL 8.x 上进行构建。它有相当旧的 GCC (8.x) 和 glibc (2.28),所以如果我天真地使用它构建我的库,我将向前兼容具有这些库的相同或更高版本的 Linux。然而,旧的 GCC 无法处理开发人员非常想要使用的 C++20 语言标准,更不用说新的 C++23 标准了。RHEL 为此提供了解决方案,但我还没有找到 Ubuntu 的类似解决方案。

Red Hat 解决方案是一个“GCC 工具集”。这些方法有很多,但它们的工作方式都是相同的。他们提供了 GCC 的更高版本(构建为在 RHEL 8.x 的运行时上运行)、标准头文件以及一些 GNU 的特殊脚本ld。这些脚本告诉链接器尽可能使用 GCC 语言运行时的系统库,对于系统库中没有的函数,将所需的代码静态链接到所链接的共享库(或可执行文件)中。这听起来很可怕,但效果非常好。这可能是因为红帽是 GCC 的主要贡献者并确保它保持正常运行。

Ubuntu有类似的东西吗?我希望有一个 Red Hat 的替代品,以防他们利用 GPL 漏洞成功地消除了他们操作系统的类似工作,因为在每台测试机器上运行它的成本太高。

我目前对 Ubuntu 编译和运行时的了解在我对相关问题的回答中进行了解释。

对于 C++20 情况,迁移到 Ubuntu LTS 22.04 就可以满足需求。然而,C++23 开始出现。我们预计 Ubuntu LTS 24.04 很快就会发布,但对于 GCC 14 中的 C++23 支持来说可能还为时过早,GCC 14 将于 2024 年 4 月或 5 月发布。我假设“企业”Ubuntu 客户会仅在其主服务器上安装 LTS 版本,而不是中间版本。

如果 Ubuntu 不这样做,也没关系。鉴于它是企业 Linux,我想我可能会遗漏一些东西。

compiling
  • 2 个回答
  • 442 Views
Martin Hope
Rajatt
Asked: 2023-07-20 14:33:14 +0800 CST

如何安装 clang-15 或更高版本?(最好是16个)

  • 6

我目前正在尝试使用 cmake 构建一个项目,出现的错误如下:

CMake Error at cmake/tools.cmake:33 (message):
  Compilation with Clang version 14.0.0 is unsupported, the minimum required
  version is 15.
Call Stack (most recent call first):
  CMakeLists.txt:18 (include)

每次我apt getclang 时,它都会默认安装 14 版本。我该如何解决?

这有点紧急,因此我们将不胜感激。谢谢!:)

compiling
  • 1 个回答
  • 32 Views
Martin Hope
Flibustero Blanco
Asked: 2023-04-06 22:24:00 +0800 CST

如何从源代码构建“su”?

  • 10

尝试在 Ubuntu 20.04 上构建自定义“su”,但从原始源开始进行测试(没有更改)。跑步

apt-get source login

我得到了 shadow-4.8.1 目录。跑步

./configure
make

并尝试运行

src/su testuser

它不起作用!验证失败错误。运行原始操作系统二进制文件:

/usr/bin/su testuser

它工作正常!卧槽?

我认为构建过程中缺少某些模块/参数。

转到 shadow 包的构建日志。

https://launchpad.net/ubuntu/+source/shadow/1:4.11.1+dfsg1-2ubuntu1/+build/23780688

并查看下一个 ./configure 字符串

./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --runstatedir=/run --disable-maintainer-mode --disable-dependency-tracking --disable-shared --without-libcrack --mandir=/usr/share/man --with-libpam --enable-shadowgrp --enable-man --disable-account-tools-setuid --with-group-name-max-length=32 --without-acl --without-attr --without-su --without-tcb 

看那边:

--without-su

试试这个 ./configure 字符串,它真的使所有二进制文件都没有“su”。尝试更换它

--with-su

新的二进制文件也不起作用。验证失败。:(

关于它的两个问题。

  1. 我在哪里可以找到原始“su”的构建日志?
  2. 为什么新构建的“su”看不到 /etc/shadow|passwd 中存在的真实操作系统用户?
compiling
  • 1 个回答
  • 544 Views
Martin Hope
Jabu-Jabu
Asked: 2022-07-08 11:06:09 +0800 CST

无法从 /usr/lib/ld 找到 -lGL

  • 0

每当我尝试编译 Code::Blocks 的 C++ 项目时,我都会收到此错误:

/usr/bin/ld: cannot find -lGL

我已尝试根据此问题的其他解决方案安装以下软件包:

fglrx-dev
fglrx-updates
fglrx-updates-dev

找不到上面的3个。

mesa-common-dev
freeglut3-dev
freeglut3
libgl1-mesa-dev
build-essential checkinstall libc6-dev libssl-dev libexpat1-dev libgl1-mesa-dev libqt4-dev libavcodec-dev libavutil-dev pkg-config
libxmu-dev
libxmu-headers
libxext-dev
libxi-dev

所有这些要么已经安装,要么什么也没做。我有 nvidia-driver-515。

compiling
  • 1 个回答
  • 79 Views
Martin Hope
Rasule
Asked: 2022-07-01 11:28:42 +0800 CST

/usr/bin/ld: 找不到 -lpython3.9d

  • 0

我在运行 cmake 然后 make 时在 ubuntu 20.04 上出现此错误

[100%] Linking CXX executable ./tmp/DearPyGuiDearSandbox/DearSandbox
/usr/bin/ld: cannot find -lpython3.9d
collect2: error: ld returned 1 exit status
make[2]: *** [sandbox/CMakeFiles/DearSandbox.dir/build.make:102: ./tmp/DearPyGuiDearSandbox/DearSandbox] Error 1
make[1]: *** [CMakeFiles/Makefile2:218: sandbox/CMakeFiles/DearSandbox.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

我已经尝试将它们包含在 CMakeLists.txt 但没有运气

include_directories(/usr/include/python3.9)
include_directories(./miniconda3/envs/ngp/lib/python3.9/)
include_directories(/usr/lib/x86_64-linux-gnu/)
include_directories(/usr/share/doc/libpython3.9)
include_directories(/usr/share/doc/libpython3.9-dev
compiling
  • 1 个回答
  • 40 Views
Martin Hope
Dan
Asked: 2022-06-24 06:32:08 +0800 CST

我怎样才能让 debhelper 尊重并行=n?

  • 1

我正在尝试为一个 cmake 项目制作一个 Debian 包,该项目在单线程模式下需要 3 个小时才能编译。我正在尝试进行并行构建,但失败了。

我试过像这样parallel=4在我的control文件中设置:

#!/usr/bin/make -f
export DEB_BUILD_OPTIONS="parallel=4"

%:
    dh $@ --parallel

根据上一个问题的接受答案,但我收到以下警告:

dh: warning: invalid flag in DEB_BUILD_OPTIONS: "parallel=4"

并且 debhelper 仍然调用make -j1.

我已经根据我在网上找到的其他建议/评论等尝试了主题的变体,但DEB_BUILD_OPTIONS="-j=4"没有DEB_BUILD_OPTIONS="-j4"效果。我试过设置debian/compat为10. 结果总是invalid flag。我怎样才能让 debhelper 尊重这个设置?

我正在 Ubuntu Focal x86_64 docker 容器中进行构建,我的版本debhelper是12.10ubuntu1.

compiling
  • 2 个回答
  • 175 Views
Martin Hope
Enterprise
Asked: 2022-04-26 14:53:55 +0800 CST

如何在 Ubuntu 22.04 上构建 Spot(原生 Spotify 客户端)?

  • 1

请帮我在 Ubuntu 22.04 上编译和安装GNOME 的原生 Spotify 客户端Spot 。

指示

以下是来自应用程序 GitHub 页面的说明:

需要 Rust(稳定)、GTK4 和其他一些东西。还需要 libadwaita:目前并非所有发行版都打包它,您可能必须自己构建它!

使用介子:

meson target -Dbuildtype=debug -Doffline=false --prefix="$HOME/.local"
ninja install -C target

这将安装一个.desktop文件以及其他内容,并且将放入现场可执行文件.local/bin(您可能希望将其添加到您的路径中)。

要构建优化的发布版本,请-Dbuildtype=release改用。

我试过的

  1. 我使用以下方式下载了源代码:

    git clone https://github.com/xou816/spot.git
    
  2. 我不知道如何在 Ubuntu 中安装 Rust(作为 deb 包)。

  3. 我已经安装了meson,ninja如下。这个对吗?我是否缺少任何其他包裹?

    sudo apt install ninja-build meson
    
  4. meson target...从上面执行命令时出现以下错误。我该如何解决这个问题?

    src/meson.build:3.0: ERROR: Pkg-config binary for machine 1 not found. Giving up.
    
compiling
  • 1 个回答
  • 153 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve