安装Solr PHP JAVA_HOME错误(Instaling Solr PHP JAVA_HOME error)
我正在尝试通过我的服务器上的命令行安装Solr PHP
我正在运行安装
root@vps25581 [/opt]# ./install_solr_service.sh solr-6.4.1.tgz
但我一直收到这个错误:
当前定义的JAVA_HOME(/ usr / local / jdk)指的是无法找到Java的位置。 中止。 修复JAVA_HOME变量或将其从环境中删除,以便搜索系统PATH。
但当我
echo $JAVA_HOME
我得到:/usr/bin/java
另外,当我检查目录
/usr/bin/java
我找不到任何.jdk文件或其他任何文件我怎样才能找到合适的位置?
I'm trying to install Solr PHP via the command line on my server
I'm running the installation with
root@vps25581 [/opt]# ./install_solr_service.sh solr-6.4.1.tgz
but I keep getting this error:
The currently defined JAVA_HOME (/usr/local/jdk) refers to a location where Java could not be found. Aborting. Either fix the JAVA_HOME variable or remove it from the environment so that the system PATH will be searched.
but when I
echo $JAVA_HOME
i get:/usr/bin/java
Also when I check the directory
/usr/bin/java
I can't find any .jdk files or any other files thereHow can I find the right location?
原文:https://stackoverflow.com/questions/42203564
最满意答案
使用
sclr
方法,该方法将具有任意数量维度的单元素PDL矩阵转换为简单的Perl标量my $dotp = sclr($mata x $matb);
Use the
sclr
method, which converts a single-element PDL matrix with any number of dimensions into a simple Perl scalarmy $dotp = sclr($mata x $matb);
相关问答
更多-
$(是Perl中的有效标量。它包含当前用户所属的以空格分隔的组ID列表。 所以print "$(a)"相当于print $( . "a)" ,你可以期待输出像 perl -e 'print "$(a)"' 100 100 14677a) $( is a valid scalar in Perl. It contains the space-separated list of group ids that the current user belongs to. So print "$(a)" is equ ...
-
Perl中的标量和列表上下文(Scalar and List context in Perl)[2023-05-18]
你的问题最终是“为什么@backwards在第6行的标量语境中”,这引出了一个问题,“如何确定一个术语的上下文?”。 上下文由术语“周围的东西”(即其“上下文”)决定。 如何确定术语的上下文? 通过查看使用该术语的运算符/函数。 如果您没有有用的stackoverflow人员告诉您它的上下文,您可以通过哪些步骤来自己找出@backwards的上下文? 我们在这里 print @backwards."\n" 所以有两个操作员/功能。 我们怎么知道哪一个为@backwards提供了上下文? 通过咨询优先权。 ... -
使用Perl PDL旋转矩阵(Use Perl PDL to rotate a matrix)[2023-06-06]
也许不是最优化的方式: pdl> $m = sequence(3,3)+1 pdl> p $m [ [1 2 3] [4 5 6] [7 8 9] ] pdl> p $m->transpose->slice( ':', '-1:0' ) [ [3 6 9] [2 5 8] [1 4 7] ] Perhaps not the most optimized way to do it: pdl> $m = sequence(3,3)+1 pdl> p $m [ [1 2 3] [4 5 ... -
在Perl中, undef , "" (以及0和"0" )评估为“false”。 所以你可以做一个布尔测试: send_email() if $list; In Perl, undef, "" (and also 0 and "0") evaluate to "false". So you can just do a boolean test: send_email() if $list;
-
我如何检查一个Perl变量是否为PDL格式(即是一个小提琴)?(How can I check if a Perl variable is in PDL format (i.e. is a piddle)?)[2022-11-01]
检查某个类是否属于某个类的典型方法是使用isa 。 if( $thing->isa("PDL") ) { ... } 这尊重继承 。 只要$thing是PDL的一个子类(或者说它是),上面的就可以工作。 这可以保护您免受自定义子类和对PDL本身的更改。 下面是一个例子。 use strict; use warnings; use v5.10; package MyPDL; our @ISA = qw(PDL); package main; use PDL; use Scalar::Util qw(b ... -
对此的严格最佳实践答案是始终将@_的内容解压缩为词法变量。 Perl Best Practices提供以下(释义)参数: 直接访问@_不是自我记录的。 $_[0] , $_[1]等等告诉你这些参数的用途。 @_的别名行为很容易被遗忘,并且可能成为程序中难以发现的错误的来源。 尽可能避免远处的怪异动作。 您可以在解@_数组时验证每个参数。 一个论点不是来自PBP: 看到my $self = shift; 在子程序的开头清楚地将其标记为OO方法而不是普通的子程序。 资料来源:Perl最佳实践(Conway 20 ...
-
Perl有两个独立但很大程度上兼容的可变系统。 包变量,它们是完全限定名称$Some::Package::variable用our声明声明的$Some::Package::variable或词法名称。 包变量存在于符号表中,对整个程序来说是全局的,可以是符号解引用的目标,并且可以用local给出一个动态范围。 用my声明的词汇变量包含其他变量系统。 这些变量不是生活在一个包或符号表中(而是生活在一个连接到范围的词法垫上)。 这些变量不是全局的,不能被符号引用,并且不能具有动态范围。 这就是为什么你不能使用$ ...
-
在子例程中,当您想直接修改传递给它的值时。 例如 sub increment_this { my ( $inc_ref ) = @_; ${$inc_ref}++; } 我知道一个微不足道的例子,但也许更相关的是chomp这样的例子,它可以从变量或$_去除尾随字母。 如果你仔细想想 - $_往往是一个参考。 如果你这样做: my @array = qw ( 1 2 3 ); foreach ( @array ) { $_++; } print @array; 修改$_ ...
-
标量上下文中的Perl数组(Perl array in scalar context)[2021-02-16]
定义数组的正确语法是 my @even = ( 0, 2, 4, 6, 8 ); my @odd = ( 1, 3, 5, 7, 9 ); 使用方括号时,实际上是创建一个匿名数组的引用 (指针),并将引用存储在@even和@odd 。 引用是标量,所以@even和@odd的长度是1。 有关参考的更多信息,请参阅Perl参考指南 。 The correct syntax for defining your arrays is my @even = ( 0, 2, 4, 6, 8 ); my @odd = ... -
使用sclr方法,该方法将具有任意数量维度的单元素PDL矩阵转换为简单的Perl标量 my $dotp = sclr($mata x $matb); Use the sclr method, which converts a single-element PDL matrix with any number of dimensions into a simple Perl scalar my $dotp = sclr($mata x $matb);