ubuntu16.04编译redis desktop manager遇到的问题

前端之家收集整理的这篇文章主要介绍了ubuntu16.04编译redis desktop manager遇到的问题前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

ubuntu16.04编译redis desktop manager的脚本为

下载并切换目录

  1. git clone --recursive https://github.com/uglide/RedisDesktopManager.git -b 0.8.0 rdm && cd ./rdm
编译脚本
  1. cd src/
  2. ./configure
  3. source /opt/qt56/bin/qt56-env.sh && qmake && make && sudo make install
  4. cd /usr/share/redis-desktop-manager/bin
  5. sudo mv qt.conf qt.backup

问题1:RedisDesktopManager下载不全的问题。

解决方法:由于官方提供到git clone命令使用了--recursive参数,这个参数会把git子模块也下载下来。但是子模块里有个google的breakpad,由于google被屏蔽,导致下载不下来,由于这个模块没下载下来,后面到模块也会停止下载。建议去掉--recursive这个参数,然后根据子模块文件.gitmodules里面的内容进行补全,补全时注意大小写和文件名,或者在下载到时候指定分支名称这样就不用再改一次。用官方到命令下载下来到可能也会由空目录,注意检查。

附:.gitmodules里的内容

  1. [submodule "3rdparty/qtconsole"]
  2. path = 3rdparty/qtconsole
  3. url = https://github.com/uglide/QtConsole.git
  4. [submodule "3rdparty/crashreporter"]
  5. path = 3rdparty/crashreporter
  6. url = https://github.com/RedisDesktop/CrashReporter.git
  7. [submodule "3rdparty/easyloggingpp"]
  8. path = 3rdparty/easyloggingpp
  9. url = https://github.com/easylogging/easyloggingpp.git
  10. [submodule "3rdparty/qredisclient"]
  11. path = 3rdparty/qredisclient
  12. url = https://github.com/uglide/qredisclient.git
  13. [submodule "3rdparty/gbreakpad"]
  14. path = 3rdparty/gbreakpad
  15. url = https://chromium.googlesource.com/breakpad/breakpad
  16. [submodule "3rdparty/qgamp"]
  17. path = 3rdparty/qgamp
  18. url = https://github.com/uglide/qgamp.git
  19. [submodule "src/resources/qml/3rdparty/PHP-unserialize-js"]
  20. path = src/resources/qml/3rdparty/PHP-unserialize-js
  21. url = https://github.com/uglide/PHP-unserialize-js.git

附:很难下载的breakpad,下载之后注意改文件夹的名称http://download.csdn.net/detail/gsls200808/9685507


问题2:linux-syscall-support头文件无法下载的问题

  1. fatal: unable to access 'https://chromium.googlesource.com/linux-syscall-support/': Failed to connect to chromium.googlesource.com port 443: 连接超时
  2. /home/liyunzhi/rdm/src/..//build/common_functions: 行 13: ./configure: 权限不够
  3. make: *** 没有指明目标并且找不到 makefile 停止。

  1. In file included from ../3rdparty/gbreakpad/src/client/linux/dump_writer_common/thread_info.h:37:0,from ../3rdparty/gbreakpad/src/client/linux/minidump_writer/linux_dumper.h:51,from ../3rdparty/gbreakpad/src/client/linux/minidump_writer/minidump_writer.h:41,from ../3rdparty/gbreakpad/src/client/linux/handler/exception_handler.h:42,from modules/crashhandler/crashhandler.cpp:11:
  2. ../3rdparty/gbreakpad/src/common/memory.h:51:51: fatal error: third_party/lss/linux_syscall_support.h: 没有那个文件或目录
  3. #include "third_party/lss/linux_syscall_support.h"
  4. ^
  5. compilation terminated.
  6. Makefile:11493: recipe for target '../bin/linux/release/obj/crashhandler.o' Failed
  7. make: *** [../bin/linux/release/obj/crashhandler.o] Error 1

解决方法:去这里下载:http://download.csdn.net/detail/gsls200808/9685972,解压后先在rdm/3rdparty/gbreakpad/src/third_party目录下创建lls目录,然后复制linux_syscall_support.h到lls目录下,笔者走了很多弯路,一开始从mongodb的源码里拷贝了一个同名文件放进去,结果很多错误没法解决

这个文件到官方下载地址是google,附原下载命令

  1. git clone https://chromium.googlesource.com/linux-syscall-support

问题3:rdm.qrc找不到PHPUnserialize.js这个文件
  1. RCC: Error in 'resources/rdm.qrc': Cannot find file 'qml/3rdparty/PHP-unserialize-js/PHPUnserialize.js'
  2. /opt/qt56/bin/rcc -name rdm resources/rdm.qrc -o ../bin/linux/release/obj/qrc_rdm.cpp
  3. RCC: Error in 'resources/rdm.qrc': Cannot find file 'qml/3rdparty/PHP-unserialize-js/PHPUnserialize.js'
  4. Makefile:753: recipe for target '../bin/linux/release/obj/qrc_rdm.cpp' Failed
  5. make: *** [../bin/linux/release/obj/qrc_rdm.cpp] Error 1


解决方法:从github上下载这个文件,然后覆盖掉里面的qml/3rdparty/(完整路径:rdm/src/resources/qml/3rdparty/)目录下的PHP-unserialize-js文件夹即可

下载命令如下

  1. git clone https://github.com/uglide/PHP-unserialize-js.git

3.编译时提示缺少libbreakpad_client.a
  1. g++: error: /home/liyunzhi/rdm/3rdparty/gbreakpad/src/client/linux/libbreakpad_client.a: 没有那个文件或目录
  2. Makefile:472: recipe for target '../bin/linux/release/rdm' Failed
  3. make: *** [../bin/linux/release/rdm] Error 1

解决方法:linux/libbreakpad_client.a这个文件需要编译才能生成,切换gbreakpad目录编译即可

4.从其他地方下载的configure不能执行的问题

相关报错:

  1. ./autotools/depcomp: 3: $'\r': 未找到命令
可能情况1:缺少权限,执行命令 sudo chmod 777 configure

可能情况2:windows的git安装时按照默认情况安装出现换行符转换问题,需要先从dos格式转成unix格式,命令如下

先安装vim,执行如下命令

  1. vim configure
  2. :set fileformat=unix
  3. :write
  4. :set ff=unix
  5. :write
或者先安装dos2unix执行命令
  1. dos2unix configure
其它可能需要转换到文件是config.guess config.sub depcomp

下面是linux-syscall-support头文件不正确的报错,算低级错误了,忽略这一段吧
  1. src/client/linux/crash_generation/crash_generation_client.cc:56:25: error: aggregate google_breakpad::{anonymous}::CrashGenerationClientImpl::RequestDump(const void*,size_t)::kernel_iovec iov has incomplete type and cannot be defined
  2. struct kernel_iovec iov;
  3. ^
  4. src/client/linux/crash_generation/crash_generation_client.cc:60:26: error: variable google_breakpad::{anonymous}::CrashGenerationClientImpl::RequestDump(const void*,size_t)::kernel_msghdr msg has initializer but incomplete type
  5. struct kernel_msghdr msg = { 0 };
  6. ^
  7. In file included from src/client/linux/crash_generation/crash_generation_client.cc:37:0:
  8. src/client/linux/crash_generation/crash_generation_client.cc:74:63: error: sys_sendmsg was not declared in this scope
  9. ssize_t ret = HANDLE_EINTR(sys_sendmsg(server_fd_,&msg,0));
  10.  
  11.  
  12. 查找发现类似的结构体和系统函数是#include <sys/uio.h>iovec,<sys/socket.h>的msghdrsendmsg
  13. kernel_iovec改为ioveckernel_msghdr改为msghdrsys_sendmsg改为sendmsg重新编译
  14.  
  15. src/client/linux/handler/exception_handler.cc: In member function bool google_breakpad::ExceptionHandler::HandleSignal(int,siginfo_t*,void*)’:
  16. src/client/linux/handler/exception_handler.cc:436:42: error: too many arguments to function int sys_prctl(int,long int)’
  17. sys_prctl(PR_SET_DUMPABLE,1,0);
  18. 436535647行,提示提示多参数,给出到函数只能传两个,那就去掉30呗,sys_prctl(PR_SET_DUMPABLE,0);改成sys_prctl(PR_SET_DUMPABLE,1);
  19.  
  20.  
  21. ./src/client/linux/minidump_writer/directory_reader.h:67:57: error: sys_getdents was not declared in this scope
  22. const int n = sys_getdents(fd_,dent,sizeof(buf_));
  23.  
  24. 去掉sys_
  25.  
  26. ./src/client/linux/minidump_writer/directory_reader.h:67:57: error: sys_getdents was not declared in this scope
  27. const int n = sys_getdents(fd_,sizeof(buf_));
  28.  
  29.  
  30. 没有定义
  31. include后,define之前加
  32. #include <linux/unistd.h>
  33. #include <dirent.h>
  34. #include <linux/types.h>
  35. #include <sys/stat.h>
  36. #include <fcntl.h>
  37.  
  38. #define __NR_getdents 141
  39. long getdents(unsigned int fd,struct linux_dirent __user *dirent,unsigned int count);
  40.  
  41. _syscall3(long,getdents,unsigned int,fd,struct linux_dirent __user *,dirent,count);
  42.  
  43. ./src/client/linux/minidump_writer/directory_reader.h:83:53: error: parameter 2 of long int getdents(unsigned int,linux_dirent)’ has incomplete type linux_dirent
  44. const int n = getdents(fd_,sizeof(buf_));
  45.  
  46.  
  47. linux_dirent-->dirent
  48.  
  49. ./src/client/linux/minidump_writer/directory_reader.h:83:53: error: could not convert dent from kernel_dirent* const to dirent
  50. const int n = getdents(fd_,sizeof(buf_));
  51.  
  52. 改所有kernel_dirent-->dirent
  53.  

启动命令

  1. cd /usr/share/redis-desktop-manager/bin
  2. ./rdm
附一张截图

附编译过的文件下载:http://download.csdn.net/detail/gsls200808/9686039

猜你在找的Ubuntu相关文章