在Ubuntu14.04系统上,我们安装了elasticsearch 2.3.4。
系统升级到16.04
apt-get update & upgrade试图升级到elasticsearch 2.4.4。
但是,我们现在得到了这个错误:
Preparing to unpack .../elasticsearch_2.4.4_all.deb ...
/var/lib/dpkg/tmp.ci/preinst: 43: /etc/default/elasticsearch: SysV: not found
dpkg: error processing archive /var/cache/apt/archives/elasticsearch_2.4.4_all.deb (--unpack):
subprocess new pre-installation script returned error exit status 127
/var/lib/dpkg/tmp.ci/postrm: 43: /etc/default/elasticsearch: SysV: not found
dpkg: error while cleaning up:
subprocess new post-removal script returned error exit status 127
...
Errors were encountered while processing:
/var/cache/apt/archives/elasticsearch_2.4.4_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)我试过:
apt-get install -f dpkg:错误处理包elasticsearch (--配置):package尚未为配置做好准备,无法为libc (2.23-0ubuntu5)配置处理触发器(当前状态为“半安装”).处理过程中遇到错误: elasticsearch E: processing /usr/bin/dpkg返回错误代码(1)dpkg --configure -a no输出apt-get install --reinstall elasticsearch /elasticsearch: SysV: not :错误处理归档文件SysV(- unpack ):子处理新的预安装脚本返回错误退出状态127 /var/lib/dpkg/tmp.ci/postrm: 43: /etc/defaul/elasticsearch: SysV:未找到dpkg:清除时出错:子进程新的后移除脚本返回的错误退出状态127个错误在处理时遇到: /var/cache/apt/archives/elasticsearch_2.4.4_all.deb E: subprocess /usr/bin/dpkg返回一个错误代码(1)dpkg --remove --force-remove-reinstreq elasticsearch dpkg:警告:覆盖问题,因为-启用了强制: dpkg:警告:包处于非常糟糕的不一致状态;您应该在尝试删除之前重新安装它(读取当前已安装的数据库. 157552文件和目录)。删除elasticsearch (2.3.4) ./var/lib/dpkg/info/弹性搜索.post: 43: /etc/缺省/ elasticsearch : SysV: not :错误处理包elasticsearch (-remove):子进程安装后删除脚本返回错误退出状态127错误在处理过程中遇到dpkg --remove --force-all elasticsearch elasticsearch :警告:重写问题,因为-启用了强制: dpkg:警告:包处于非常糟糕的不一致状态;您应该在尝试删除之前重新安装它(读取当前已安装的数据库. 157552文件和目录)。删除elasticsearch (2.3.4) ./var/lib/dpkg/info/弹性搜索.post: 43: /etc/缺省/ elasticsearch : SysV: not :错误处理包elasticsearch (-remove):子进程安装后删除脚本返回错误退出状态127错误在处理过程中遇到dpkg --purge elasticsearch dpkg:错误处理包elasticsearch (--清除):包处于非常糟糕的不一致状态;在处理过程中遇到删除错误之前,应该重新安装它我甚至尝试过从systemd切换回upstart-sysv,但是在重新启动之后,什么都没有改变。
任何想法都欢迎。
发布于 2017-01-26 09:15:23
在/etc/default/elasticsearch中有一个部分
SysV init.d
# When executing the init script, this user will be used to run the elasticsearch service.
# The default value is 'elasticsearch' and is declared in the init.d file.
# Note that this setting is only used by the init script. If changed, make sure that
# the configured user can read and write into the data, work, plugins and log directories.
# For systemd service, the user is usually configured in file /usr/lib /systemd/system/elasticsearch.service
ES_USER=elasticsearch
ES_GROUP=elasticsearch我评论了整个章节。
然后,安装工作得以进行。
它实际上促使我提出了“安装包保持器版本/保持系统版本”的问题,这个问题在差异中显示,安装的意图无论如何都是要注释掉该部分。
https://askubuntu.com/questions/876234
复制相似问题