首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在Raspbian 11 (斗牛眼)上既没有找到读行,也没有找到libedit。

在Raspbian 11 (斗牛眼)上既没有找到读行,也没有找到libedit。
EN

Stack Overflow用户
提问于 2022-04-18 18:48:47
回答 1查看 180关注 0票数 0

我正在尝试编译Ruby,我得到了以下内容:

代码语言:javascript
运行
复制
root@raspberrypi:~/ruby-3.1.2# make -j4
...
linking ruby
make[2]: Leaving directory '/root/ruby-3.1.2'
make[1]: Leaving directory '/root/ruby-3.1.2'
make[1]: Entering directory '/root/ruby-3.1.2'
*** Following extensions are not compiled:
readline:
    Could not be configured. It will not be installed.
    /root/ruby-3.1.2/ext/readline/extconf.rb:62: Neither readline nor libedit was found
    Check ext/readline/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
make[1]: Leaving directory '/root/ruby-3.1.2'
root@raspberrypi:~/ruby-3.1.2#

不过,我确实同时安装了:

代码语言:javascript
运行
复制
root@raspberrypi:~/ruby-3.1.2# apt-get install libreadline-dev libedit-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libedit-dev is already the newest version (3.1-20191231-2).
libreadline-dev is already the newest version (8.1-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

这与在Raspbian 10上预期的一样工作,但不确定为什么它不工作在Raspbian 11上?

代码语言:javascript
运行
复制
root@raspberrypi:~/ruby-3.1.2# lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 11 (bullseye)
Release:    11
Codename:   bullseye

ext/readline/mkmf.log (面向底部)的相关部分还显示如下:

代码语言:javascript
运行
复制
...
have_header: checking for readline/readline.h... -------------------- no

LD_LIBRARY_PATH=.:../.. "gcc -I../../.ext/include/armv7l-linux-eabihf -I../.././include -I../.././ext/readline  -D_FILE_OFFSET_BITS=64  -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef   -c conftest.c"
conftest.c:3:10: fatal error: readline/readline.h: No such file or directory
    3 | #include <readline/readline.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <readline/readline.h>
/* end */

--------------------

have_header: checking for editline/readline.h... -------------------- no

LD_LIBRARY_PATH=.:../.. "gcc -I../../.ext/include/armv7l-linux-eabihf -I../.././include -I../.././ext/readline  -D_FILE_OFFSET_BITS=64  -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef   -c conftest.c"
conftest.c:3:10: fatal error: editline/readline.h: No such file or directory
    3 | #include <editline/readline.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <editline/readline.h>
/* end */

--------------------

/root/ruby-3.1.2/ext/readline/extconf.rb:62: Neither readline nor libedit was found
    /root/ruby-3.1.2/ext/readline/extconf.rb:62:in `<top (required)>'
    ./ext/extmk.rb:214:in `load'
    ./ext/extmk.rb:214:in `block in extmake'
    /root/ruby-3.1.2/lib/mkmf.rb:332:in `open'
    ./ext/extmk.rb:210:in `extmake'
    ./ext/extmk.rb:572:in `block in <main>'
    ./ext/extmk.rb:568:in `each'
    ./ext/extmk.rb:568:in `<main>'

这些文件肯定存在(与Raspbian 10相同的路径):

代码语言:javascript
运行
复制
root@raspberrypi:~/ruby-3.1.2# find / | grep readline.h$
/usr/include/readline/readline.h
/usr/include/editline/readline.h

有什么想法吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-05-03 00:10:33

我删除并重新下载了源代码,并按预期进行了编译!-我不知道源代码是如何被破坏的,但这是解决方案!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71915846

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档