首页 \ 问答 \ pecl / solr似乎无法正常安装(pecl/solr cant seem to install normaly)

pecl / solr似乎无法正常安装(pecl/solr cant seem to install normaly)

我正在尝试通过PHP连接到我的Solr服务器。 我得到了一个用户SolrClient()的教程。 我的,但我的Linux(ubuntu)服务器上没有。 现在我正在尝试将它安装到我的apache。 问题是我似乎无法使扩展工作。 我试图通过sudo pecl install solr-beta来获取它。 但这会导致以下错误:“pecl / solr”的下载成功,但它不是有效的包存档。

所以我的问题是,如果这是根据大多数教程的唯一方法,我可以得到这个扩展的apache? 我该如何实现这一目标。 我真的很好。

哦,我试图通过下载得到它,但配置和使用make缺少必要的文件。


I'm trying to connect to my Solr server trough PHP. I got a tutorial that users the SolrClient(). My but this was not available on my Linux (ubuntu) server. Now I'm trying to install it to my apache. The problem is that I cant seem to get the extensions working. I am trying to get it through sudo pecl install solr-beta. But this keeps giving the following error: Download of "pecl/solr" succeeded, but it is not a valid package archive.

So my question is how can this be when this is according to most tutorials the only way i can get this extention of apache? And how do I get this working. I'm realy stuk.

Ohh I have tried to get it trough download but the necessary files are missing to configure and use make.


原文:https://stackoverflow.com/questions/26732637
更新时间:2021-12-03 09:12

最满意答案

你在写main()还是_start

如果你正在编写main ,它是一个正常的函数,其args在rdirsi ,遵循正常的调用约定。 有关x86-64 ABI的链接请参阅x86标记wiki

如果您正在编写_start ,那么数据就在堆栈中,如ABI的进程启动部分所述: [rsp] = argc ,以及指针数组, char *arg[]rsp+8 。 它是堆栈上的实际数组,而不是像main获取的数组指针

除非你初始化它,否则rbp没有意义。 它拥有呼叫者留在其中的任何内容。


你的代码片段也很愚蠢:你永远不会初始化rbp。 你应该假设它在进程输入时持有垃圾。 只有rsp才有用。

lea只是一个使用有效地址语法/编码的移位和添加指令。 mov是加载/存储的助记符。

    ;; your code with comments, also assuming that RBP was initialized
    bits 64
    lea r8, [rbp-0x10]      ; r8 = rbp-0x10
    mov r9, [r8]            ; should have just done mov r9, [rbp-0x10]
    mov r10, [r9+0x10]
    jmp r10                 ; jump to argv[2]???

你把机器代码字节放在argv[2]吗? 跳转到字符串通常不是很有用。

当然,由于rbp没有初始化,它实际上并没有访问argv[2]


工作实例

如果你想看看发生了什么,在调试器中单步执行此操作。

; get argc and argv from the stack, for x86-64 SysV ABI
global _start
_start:
    mov   ecx,  [rsp]             ;   load argc (assuming it's smaller than 2^32)

    cmp   ecx, 3
    jb  .argc_below_3
                                  ;   argv[0] is at rsp+8
    mov   rsi,  [rsp+8 +  8*2]    ;   argv[2]  (the 3rd element)
    movzx eax,  byte [rsi]        ;   first char of argv[2]

    ; if you stop here in a debugger, you can see the character from the second arg.

    ; fall through and exit
.argc_below_3:
    xor edi, edi
    mov eax, 231                  ;  exit_group(0)
    syscall

Are you writing main() or _start?

If you're writing main, it's a normal function with its args in rdi, rsi, following the normal calling convention. See tag wiki for links to the x86-64 ABI.

If you're writing _start, then data is on the stack, as documented in process startup section of the ABI: [rsp] = argc, and above that an array of pointers, char *arg[] starting at rsp+8. It's an actual array right there on the stack, not a pointer to an array like main gets.

rbp is meaningless unless you initialize it. It has whatever the caller left in it.


Your code fragment is silly, too: you never initialize rbp. You should assume it holds garbage on process entry. Only rsp is guaranteed to be useful.

lea is just a shift & add instruction that uses effective-address syntax / encoding. mov is the mnemonic for load / store.

    ;; your code with comments, also assuming that RBP was initialized
    bits 64
    lea r8, [rbp-0x10]      ; r8 = rbp-0x10
    mov r9, [r8]            ; should have just done mov r9, [rbp-0x10]
    mov r10, [r9+0x10]
    jmp r10                 ; jump to argv[2]???

Did you put machine code bytes in argv[2]? Jumping to a string is not normally useful.

Of course, since rbp isn't initialized, it's not actually accessing argv[2].


Working example

single-step this in a debugger if you want to see what's going on.

; get argc and argv from the stack, for x86-64 SysV ABI
global _start
_start:
    mov   ecx,  [rsp]             ;   load argc (assuming it's smaller than 2^32)

    cmp   ecx, 3
    jb  .argc_below_3
                                  ;   argv[0] is at rsp+8
    mov   rsi,  [rsp+8 +  8*2]    ;   argv[2]  (the 3rd element)
    movzx eax,  byte [rsi]        ;   first char of argv[2]

    ; if you stop here in a debugger, you can see the character from the second arg.

    ; fall through and exit
.argc_below_3:
    xor edi, edi
    mov eax, 231                  ;  exit_group(0)
    syscall

相关问答

更多
  • 在标准体系结构中,您可以存储变量的各种位置: 数据段/ BSS:用于全局变量和静态局部变量(具有静态存储持续时间的变量); 堆栈:局部变量(具有自动存储持续时间的变量); 堆:动态变量(具有动态存储持续时间的变量,使用new或malloc的函数分配)。 编译器如何解析变量的地址取决于变量的存储位置。 数据段/ BSS 这些是具有静态存储持续时间的变量,编译器在编译时知道它们的所有内容,并且它们的地址在链接时已知。 请看以下代码段: int a = 0; int main () { return a ...
  • 在你的第一个代码部分,你必须为SYS_READ设置SYS_CALL为0 (如在其他答案中提到的那样)。 因此,请检查Linux x64 SYS_CALL列表以获取适当的参数并尝试 _start: mov rax, 0 ; set SYS_READ as SYS_CALL value sub rsp, 8 ; allocate 8-byte space on the stack as read buffer mov ...
  • 现代x86微架构可以通过堆栈实现几乎免费的多种通话方式: 1.一个专用的堆栈引擎,用于在执行OoO期间将堆栈指针与堆栈操作保持同步。 2.硬件返回堆栈保持返回地址以便快速访问。 而且,整个架构与MIPS不同。 MIPS和大多数其他RISC都是加载存储,这意味着它们必须将返回地址存储在寄存器中,否则call/return将不得不加载/存储操作,从而扰乱指令集的正交性。 x86是一种寄存器内存架构,针对这些访问进行了优化,特别是采用微操作融合等现代微架构特性,弥补了相对较少的寄存器数量。 最后,这只会加速专门用 ...
  • 你在写main()还是_start ? 如果你正在编写main ,它是一个正常的函数,其args在rdi , rsi ,遵循正常的调用约定。 有关x86-64 ABI的链接,请参阅x86标记wiki 。 如果您正在编写_start ,那么数据就在堆栈中,如ABI的进程启动部分所述: [rsp] = argc ,以及指针数组, char *arg[]从rsp+8 。 它是堆栈上的实际数组,而不是像main获取的数组指针 。 除非你初始化它,否则rbp没有意义。 它拥有呼叫者留在其中的任何内容。 你的代码片段也 ...
  • 嗯,我从哪里开始...... 首先,我担心x64默认没有帧指针,因此没有简单的方法可以通过跟随rbp链来重建堆栈。 此外,即使您使用-fno-omit-frame-pointer重新编译所有参与的代码(包括Glibc!)信号处理程序的帧可能由内核以非常特殊的方式设置,因此无法保证您将能够通过它通过帧指针。 BTW这可能是__builtin_frame_address运行时失败的原因。 接下来,您提到要通过更改编译器后面的返回地址来放松。 没有什么比运行时崩溃更好的方法了。 编译器在功能框架中保存了大量关键信 ...
  • 这段代码的问题非常简单。 在使用AT&T语法的GNU汇编程序中 - 用作立即操作数的文字常量需要以$ (美元符号)作为前缀,否则该常量将被视为内存操作数。 这些行都有这个问题: subq obj_size, %rsp movq 1, %rax [snip] addq obj_size, %rsp 在这些情况下,因为您要使用常量obj_size和1作为值(立即操作数)而不是内存引用。 上面的说明应该是: subq $obj_size, %rsp movq $1, %rax [snip] addq $obj_ ...
  • 错误在于: mov rax, qword rdi ; save pointer address in rdi to return it later 我认为这应该是: mov rax,rdi ; save pointer address in rdi to return it later 另外我认为主循环应该像这样重写(不是最佳的,因为它一次只有一个字符,但鉴于你在每个循环中增加一次rsi和rdi ,我认为这就是你想要做的): next: cmp byte [rsi],0 je ...
  • 很可能, pData字段在[rbx + 8] ,而不是[rbx + 4] 。 编译器在ulParam1和pData之间插入一些额外的空间(“padding”),这样pData就是8字节对齐的(这使得访问更快)。 Quite probably, the pData field is at [rbx + 8], not [rbx + 4]. The compiler inserts some extra space ("padding") between ulParam1 and pData so that p ...
  • 我将假设在64位OS / X上,您正在组装和链接,以便您有意绕过C运行时代码。 一个例子是在没有C运行时启动文件和系统库的情况下进行静态构建,并且您指定_main是您的程序入口点。 除非被覆盖,否则_start通常是进程入口点。 在这种情况下,64位内核会将macho64程序加载到内存中,并使用程序参数和环境变量以及其他内容设置进程堆栈。 启动时的Apple OS / X进程堆栈状态与第3.4节中 System V x86-64 ABI中记录的相同: 一个观察结果是参数指针列表以NULL(0)地址终止。 您 ...
  • gcc inline asm是一个复杂的野兽。 "r" (2)表示分配一个int大小的寄存器并加载值为2 。 如果你只需要一个任意的临时寄存器,你可以在输出部分声明一个64位的早期虚假输出,例如"=&r" (dummy) ,前面声明了void *dummy 。 有关更多详细信息,请参阅gcc手册 。 至于最终的代码片段看起来像你想要一个内存屏障,就像链接的电子邮件所说的那样。 例如,请参阅手册 。 gcc inline asm is a complicated beast. "r" (2) means al ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。