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
    • 最新
    • 标签
主页 / user-1026885

chiehpower's questions

Martin Hope
chiehpower
Asked: 2020-04-27 21:44:20 +0800 CST

使文件错误以构建 libbot2 库

  • 0

让我描述一下我的问题。到目前为止,我正在构建请求libbot2库的 MPNet。

  • MPNet GitHub
  • libbot2 GitHub

我已经安装了以下需求库:

        GLib 2.0+
        CMake
        LCM       (http://lcm.googlecode.com)
        Java      (Sun JDK or OpenJDK strongly preferred)
        Python
        GTK+ 2.0+ (required by bot2-vis)
        OpenGL    (required by bot2-vis)
        GLUT
        PyGTK
    libglib2.0-dev
    cmake
    sun-java6-jdk | default-jdk | openjdk-6-jdk
    python-dev
    python-gtk2
    libgtk2.0-dev
    mesa-common-dev
    libgl1-mesa-dev
    libglu1-mesa-dev
    freeglut3-dev
    libjpeg-dev

这是我的部分环境设置。

OS: Ubuntu 18.04
    freeglut3-dev is already the newest version (2.8.1-3)
    libxi-dev is already the newest version (2:1.7.9-1)
    libxmu-dev is already the newest version (2:1.1.2-2)
    binutils is already the newest version (2.30-21ubuntu1~18.04.3)
    libglu1-mesa-dev is already the newest version (9.0.0-2.1build1)
    libgtk2.0-dev is already the newest version (2.24.32-1ubuntu1)
    libjpeg-dev is already the newest version (8c-2ubuntu8)
    freeglut3-dev is already the newest version (2.8.1-3)
    libgl1-mesa-dev is already the newest version (19.2.8-0ubuntu0~18.04.3)
    libglib2.0-dev is already the newest version (2.56.4-0ubuntu0.18.04.6)
    mesa-common-dev is already the newest version (19.2.8-0ubuntu0~18.04.3)
    LCM version 1.4.0

当我使用sudo make时,我得到了这个错误。我发现我无法成功构建bot2-vis这个阶段。

-------------------------------------------
-- bot2-vis
-------------------------------------------
[  2%] Building C object src/bot_vis/CMakeFiles/bot2-vis.dir/viewer.c.o
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c: In function ‘bot_viewer_start_recording’:
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:136:21: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
     self->movie_gzf = gzopen(self->movie_path, "w");
                     ^
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:137:17: warning: passing argument 1 of ‘gzsetparams’ from incompatible pointer type [-Wincompatible-pointer-types]
     gzsetparams(self->movie_gzf, Z_BEST_SPEED, Z_DEFAULT_STRATEGY);
                 ^~~~
In file included from /home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:9:0:
/usr/include/zlib.h:1380:21: note: expected ‘gzFile {aka struct gzFile_s *}’ but argument is of type ‘struct gzFile_s **’
 ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
                     ^~~~~~~~~~~
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c: In function ‘bot_viewer_stop_recording’:
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:173:13: warning: passing argument 1 of ‘gzclose’ from incompatible pointer type [-Wincompatible-pointer-types]
     gzclose(self->movie_gzf);
             ^~~~
In file included from /home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:9:0:
/usr/include/zlib.h:1631:24: note: expected ‘gzFile {aka struct gzFile_s *}’ but argument is of type ‘struct gzFile_s **’
 ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
                        ^~~~~~~
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c: In function ‘on_gl_expose’:
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:498:18: warning: passing argument 1 of ‘gzprintf’ from incompatible pointer type [-Wincompatible-pointer-types]
         gzprintf(self->movie_gzf, "P6 %d %d %d\n", self->movie_width, self->movie_height, 255);
                  ^~~~
In file included from /home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:9:0:
/usr/include/zlib.h:1469:23: note: expected ‘gzFile {aka struct gzFile_s *}’ but argument is of type ‘struct gzFile_s **’
 ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
                       ^~~~~~~~
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:502:21: warning: passing argument 1 of ‘gzwrite’ from incompatible pointer type [-Wincompatible-pointer-types]
             gzwrite(self->movie_gzf, &self->movie_buffer[offset], self->movie_stride);
                     ^~~~
In file included from /home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:9:0:
/usr/include/zlib.h:1447:21: note: expected ‘gzFile {aka struct gzFile_s *}’ but argument is of type ‘struct gzFile_s **’
 ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
                     ^~~~~~~
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c: In function ‘on_button_press’:
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:600:5: error: expected ‘,’ or ‘;’ before ‘BotEventHandler’
     BotEventHandler *best_handler = NULL;
     ^~~~~~~~~~~~~~~
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:610:21: error: ‘best_handler’ undeclared (first use in this function); did you mean ‘sa_handler’?
                     best_handler = handler;
                     ^~~~~~~~~~~~
                     sa_handler
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:610:21: note: each undeclared identifier is reported only once for each function it appears in
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c: In function ‘on_motion_notify’:
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:690:2: error: expected ‘,’ or ‘;’ before ‘BotEventHandler’
  BotEventHandler *best_handler = NULL;
  ^~~~~~~~~~~~~~~
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:701:21: error: ‘best_handler’ undeclared (first use in this function); did you mean ‘sa_handler’?
                     best_handler = handler;
                     ^~~~~~~~~~~~
                     sa_handler
src/bot_vis/CMakeFiles/bot2-vis.dir/build.make:322: recipe for target 'src/bot_vis/CMakeFiles/bot2-vis.dir/viewer.c.o' failed
make[4]: *** [src/bot_vis/CMakeFiles/bot2-vis.dir/viewer.c.o] Error 1
CMakeFiles/Makefile2:130: recipe for target 'src/bot_vis/CMakeFiles/bot2-vis.dir/all' failed
make[3]: *** [src/bot_vis/CMakeFiles/bot2-vis.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make[2]: *** [all] Error 2
Makefile:27: recipe for target 'all' failed
make[1]: *** [all] Error 2
Makefile:19: recipe for target 'all' failed
make: *** [all] Error 2

我怎么解决这个问题?谢谢

make python-2.7 cmake
  • 1 个回答
  • 75 Views
Martin Hope
chiehpower
Asked: 2019-12-20 16:37:29 +0800 CST

Ubuntu apt fix-broken install 的问题

  • 2

当我需要使用 apt-get 安装某些东西时。

$sudo apt-get install autoconf automake libtool curl make g++ unzip  

Reading package lists... Done
Building dependency tree       
Reading state information... Done
make is already the newest version (4.1-9.1ubuntu1).
unzip is already the newest version (6.0-21ubuntu1).
unzip set to manually installed.
curl is already the newest version (7.58.0-2ubuntu3.8).
g++ is already the newest version (4:7.4.0-1ubuntu2.3).
g++ set to manually installed.
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 autoconf : Depends: m4 (>= 1.4.13)
 automake : Depends: autotools-dev (>= 20020320.1) but it is not going to be installed
 libtool : Depends: autotools-dev but it is not going to be installed
           Recommends: libltdl-dev but it is not going to be installed
 nvidia-cuda-toolkit : Depends: nvidia-cuda-dev (= 9.1.85-3ubuntu1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

收到此错误消息后,我尝试修复它。

但是,当我输入“sudo apt --fix-broken install”时,我在下面收到了这个错误。

$sudo apt --fix-broken install                                                                                                                                      

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  nvidia-cuda-dev
Recommended packages:
  libnvcuvid1
The following NEW packages will be installed:
  nvidia-cuda-dev
0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.
38 not fully installed or removed.
Need to get 0 B/263 MB of archives.
After this operation, 734 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 222357 files and directories currently installed.)
Preparing to unpack .../nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb ...
Unpacking nvidia-cuda-dev (9.1.85-3ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb (--unpack):
 trying to overwrite '/usr/include/cublas.h', which is also in package libcublas-dev 10.2.2.89-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1) 

在这里,关于 nvidia-cuda-dev,我已经多次遇到过这个问题。我安装了 cuda 10.2 版本。但我不知道它为什么要使用版本 9?但是我需要这个版本(10.2),我不想改变它,我害怕我的环境会出错。

$nvcc --version 

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89

对不起,我不熟悉这里的环境设置。对这种情况有什么建议吗?

非常感谢!

system-installation nvidia cuda environment
  • 1 个回答
  • 908 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