我对 Linux 还很陌生。我目前使用的是 Ubuntu 10.04 桌面版。总之,前段时间我有点醉了,用密码加密了一个 .rar 文件,然后删除了原始文件。现在我真的想找回这些文件,所以我下载了最新版本的 rarcrack (0.2)。
我好像无法安装它!当我进入 rarcarck-0.2 文件夹并按照其网站提示输入“make”时,发生了以下情况。
root@linux:~/rarcrack-0.2# make
gcc -pthread rarcrack.c `xml2-config --libs --cflags` -O2 -o rarcrack
/bin/sh: xml2-config: not found
In file included from rarcrack.c:21:
rarcrack.h:25:48: error: libxml/xmlmemory.h: No such file or directory
rarcrack.h:26:27: error: libxml/parser.h: No such file or directory
rarcrack.h:27:36: error: libxml/parserInternals.h: No such file or directory
rarcrack.h:28:25: error: libxml/tree.h: No such file or directory
rarcrack.h:29:28: error: libxml/threads.h: No such file or directory
rarcrack.c:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pwdMutex’
rarcrack.c:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘status’
rarcrack.c:35: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘finishedMutex’
rarcrack.c: In function ‘savestatus’:
rarcrack.c:46: error: ‘xmlNodePtr’ undeclared (first use in this function)
rarcrack.c:46: error: (Each undeclared identifier is reported only once
rarcrack.c:46: error: for each function it appears in.)
rarcrack.c:46: error: expected ‘;’ before ‘root’
rarcrack.c:47: error: expected ‘;’ before ‘node’
rarcrack.c:48: error: ‘xmlChar’ undeclared (first use in this function)
rarcrack.c:48: error: ‘tmp’ undeclared (first use in this function)
rarcrack.c:49: error: ‘status’ undeclared (first use in this function)
rarcrack.c:50: error: ‘root’ undeclared (first use in this function)
rarcrack.c:52: error: ‘finishedMutex’ undeclared (first use in this function)
rarcrack.c:53: error: ‘node’ undeclared (first use in this function)
rarcrack.c:55: error: ‘pwdMutex’ undeclared (first use in this function)
rarcrack.c:56: error: expected ‘)’ before ‘xmlChar’
rarcrack.c:66: error: expected ‘)’ before ‘xmlChar’
rarcrack.c: In function ‘loadstatus’:
rarcrack.c:87: error: ‘xmlNodePtr’ undeclared (first use in this function)
rarcrack.c:87: error: expected ‘;’ before ‘root’
rarcrack.c:88: error: expected ‘;’ before ‘node’
rarcrack.c:89: error: ‘xmlParserCtxtPtr’ undeclared (first use in this function)
rarcrack.c:89: error: expected ‘;’ before ‘parserctxt’
rarcrack.c:96: error: ‘status’ undeclared (first use in this function)
rarcrack.c:99: error: ‘root’ undeclared (first use in this function)
rarcrack.c:103: error: ‘parserctxt’ undeclared (first use in this function)
rarcrack.c:104: error: ‘node’ undeclared (first use in this function)
rarcrack.c:108: error: ‘XML_SUBSTITUTE_BOTH’ undeclared (first use in this function)
rarcrack.c:127: error: ‘finishedMutex’ undeclared (first use in this function)
rarcrack.c: In function ‘nextpass’:
rarcrack.c:170: error: ‘pwdMutex’ undeclared (first use in this function)
rarcrack.c: In function ‘status_thread’:
rarcrack.c:182: error: ‘finishedMutex’ undeclared (first use in this function)
rarcrack.c:188: error: ‘pwdMutex’ undeclared (first use in this function)
rarcrack.c: In function ‘crack_thread’:
rarcrack.c:206: warning: comparison between pointer and integer
rarcrack.c:208: error: ‘finishedMutex’ undeclared (first use in this function)
rarcrack.c:205: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
rarcrack.c: In function ‘init’:
rarcrack.c:250: error: ‘pwdMutex’ undeclared (first use in this function)
rarcrack.c:251: error: ‘finishedMutex’ undeclared (first use in this function)
rarcrack.c:283: warning: format ‘%s’ expects type ‘char *’, but argument 3 has type ‘char (*)[300]’
rarcrack.c:317: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result
rarcrack.c: In function ‘main’:
rarcrack.c:351: error: ‘status’ undeclared (first use in this function)
rarcrack.c:353: error: ‘pwdMutex’ undeclared (first use in this function)
rarcrack.c:354: error: ‘finishedMutex’ undeclared (first use in this function)
make: *** [all] Error 1
当我输入“make install”时,会发生以下情况。
root@linux:~/rarcrack-0.2# make install
install -s rarcrack /usr/bin/bin
install: cannot stat `rarcrack': No such file or directory
make: *** [install] Error 1
任何帮助都将不胜感激。提前致谢!
答案1
使用 10.04 安装也是完全可行的。至少在我的笔记本电脑上似乎只有 1 个额外要求。在命令行中运行sudo apt-get install libxml2-dev
安装名为的库libxml2-dev
,然后运行make
等。
答案2
所以您是 Linux 新手,使用 Ubuntu 10.04?实际版本是 13.04。您的问题可能是由于缺少或过时的软件包造成的。编译时,程序找不到该信息。
升级系统将是解决您很快就会遇到的很多问题的最佳方法。但我不确定您是否可以通过更新管理器执行此操作,因为 10.04 虽然是长期支持 LTS,但不再受支持(自 2013 年 5 月以来)。实际 LTS 是 12.04。
打开更新管理器,它应该位于“应用程序 - 管理”或“系统”中。我不记得了,因为我使用的是 Unity。然后查看是否有“更新到新版本”的项目。如果是 10.10,那么我建议下载实际版本并替换旧系统。
如果您的硬件也过时了,那么您应该考虑安装 Lubuntu,它是 Ubuntu 的轻量级版本。
然后编译并安装缺少的软件包(如果是这种情况)。