如何从二进制文件安装 memcached 并包含在 c 文件中
How to install memcached from binaries and include in c file
我正在尝试在ubuntu 16.04上安装memcached。我需要手动安装它,因为我想修改文件。我也不想在本地安装它,因为我的更改可能不是其他人想要从他们的内存缓存中得到的。
我尝试按照 github https://github.com/memcached/memcached/wiki/Install 中的说明进行操作(将前缀和 libevent 路径更改为在我的主目录中)。
Libevent安装:
./configure --prefix=/path/to/home/local_include
做
进行安装
这似乎有效,因为 memcached 配置没有抱怨。
内存缓存安装:
WGET https://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-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时,但是没有明显的程序正在安装的痕迹。
我还尝试重新安装并将制作安装说明更改为:
使安装 --前缀=前缀
和
使安装 --前缀=/路径/到/主页/local_lib
尽管它们都没有被注册为可接受的参数(尽管 INSTALL 说明似乎表明它们会被注册)。
如果有人有任何想法,我将不胜感激。谢谢。
您构建了二进制文件,但尚未启动它。
尝试通过以下方式启动它:sudo service memcached restart
如果这不起作用,则运行以下命令:sudo /etc/init.d/memcached restart
- vcruntime.h 从 Windows 包含文件夹中丢失?
- 禁止显示有关包含文件中 #pragma 包的警告
- 无法打开包含文件:在 vs2017 上'QtWidgets/qtwidgetsglobal.h'
- 包含文件 <sched_yield.h>在我的 RHEL 5 上找不到
- 尝试使用 MSVC 从源代码构建 qt 创建器:无法打开包含文件:"stddef.h":没有这样的文件或目录
- 无法打开包含文件'Graphics.hpp'没有这样的文件或目录,Visual Studio的其他包含不起作用
- 为什么 C++ 编译器在"c:program filesgnu emacsinclude"中查找包含文件?
- 包含文件中的 Typdef "未在此范围内声明"
- 错误: C1083: 无法打开包含文件:"boost/asio.hpp": 没有此类文件或目录
- SFML c ++ 当包含文件内游戏中发生事件时,如何使用铃声函数为我的游戏创建声音类?
- 在Windows上设置CMake和vcpkg时出错"无法打开包含文件"
- 致命错误 C1083:无法打开包含文件:"GL/glew.h":没有此类文件或目录
- Qt自动生成的.rc文件无法打开包含文件'windows.h'
- Visual Studio 停止识别任何包含文件
- 无法打开包含文件:"签证.h"
- 如何检查每个头文件是否包含必需的包含文件?
- Protobuf:无法在 message.pb.h 文件中打开包含文件 common.h
- extern 关键字在包含文件头文件C++
- 错误:无法打开包含文件:"MQTTAsync.h":没有此类文件或目录
- #include "date.h" 创建错误 E1696 无法打开源文件"date.h",也无法打开包含文件:没有这样的文件或目录