【问题标题】:How to install memcached from binaries and include in c file如何从二进制文件安装 memcached 并包含在 c 文件中
【发布时间】:2019-05-30 01:37:14
【问题描述】:

我正在尝试在 ubuntu 16.04 上安装 memcached。我需要手动安装它,因为我想修改文件。我也不想在本地安装它,因为我的更改可能不是其他人从他们的 memcached 中想要的。

我已尝试按照 github https://github.com/memcached/memcached/wiki/Install 的说明进行操作(将前缀和 libevent 路径更改为我的主目录中)。


Libevent 安装:

./configure --prefix=/path/to/home/local_include

制作

进行安装


这似乎有效,因为 memcached 配置没有抱怨。


memcached 安装:

wgethttps://memcached.org/latest

tar -zxf memcached-1.5.13.tar.gz

./configure --prefix=/path/to/home/local_include --with-libevent=/path/to/home/local_include

制作

进行测试

进行安装


这样做我没有看到任何错误。这是我完成 make install 后的结果:

 make  install-recursive
 make[1]: Entering directory `/path/to/home/memcached-1.5.13'
 Making install in doc
 make[2]: Entering directory `/path/to/home/memcached-1.5.13/doc'
 make  install-am
 make[3]: Entering directory `/path/to/home/memcached-1.5.13/doc'
 make[4]: Entering directory `/path/to/home/memcached-1.5.13/doc'
 make[4]: Nothing to be done for `install-exec-am'.
  /usr/bin/mkdir -p '/path/to/home/local_includes/share/man/man1'
  /usr/bin/install -c -m 644 memcached.1 '/path/to/home/local_includes/share/man/man1'
 make[4]: Leaving directory `/path/to/home/memcached-1.5.13/doc'
 make[3]: Leaving directory `/path/to/home/memcached-1.5.13/doc'
 make[2]: Leaving directory `/path/to/home/memcached-1.5.13/doc'
 make[2]: Entering directory `/path/to/home/memcached-1.5.13'
 make[3]: Entering directory `/path/to/home/memcached-1.5.13'
  /usr/bin/mkdir -p '/path/to/home/local_includes/bin'
   /usr/bin/install -c memcached '/path/to/home/local_includes/bin'
  /usr/bin/mkdir -p '/path/to/home/local_includes/include/memcached'
  /usr/bin/install -c -m 644 protocol_binary.h '/path/to/home/local_includes/include/memcached'
 make[3]: Leaving directory `/path/to/home/memcached-1.5.13'
 make[2]: Leaving directory `/path/to/home/memcached-1.5.13'
 make[1]: Leaving directory `/path/to/home/memcached-1.5.13'

当我运行 ps ax | grep memcached 但是没有明显的正在安装的程序的痕迹。


我也尝试重新安装并将 make install 指令更改为:

make install --prefix=PREFIX

make install --prefix=/path/to/home/local_lib


尽管它们都没有被注册为可接受的参数(尽管 INSTALL 指令似乎表明它们会是)。

如果有人有任何想法,我将不胜感激。谢谢。

【问题讨论】:

  • 它安装在“/path/to/home/local_includes/bin/memcached”。构建和安装它并不意味着它正在运行。这是你的责任。

标签: c++ c linux ubuntu memcached


【解决方案1】:

您构建了二进制文件但尚未启动它。

尝试通过以下方式启动它: sudo service memcached restart

如果这不起作用,请运行以下命令: sudo /etc/init.d/memcached restart

【讨论】:

  • 谢谢!不敢相信我错过了这么明显的事情。
猜你喜欢
  • 1970-01-01
  • 2017-03-16
  • 1970-01-01
  • 1970-01-01
  • 2018-06-29
  • 1970-01-01
  • 1970-01-01
  • 2013-08-12
  • 1970-01-01
相关资源
最近更新 更多