首页 \ 问答 \ brew安装redis(osx 10.7)(brew install redis (osx 10.7))

brew安装redis(osx 10.7)(brew install redis (osx 10.7))

我尝试通过在bash中的自制软件在osx 10.7上安装Redis,并且出现以下错误:

==> Downloading http://redis.googlecode.com/files/redis-2.6.9.tar.gz
Already downloaded: /Library/Caches/Homebrew/redis-2.6.9.tar.gz
==> make -C /private/tmp/redis-wQAX/redis-2.6.9/src CC=cc
Error: Permission denied - /usr/local/var/db

Redis没有安装我所知道的。

$ ps -aux | grep redis
ps: No user named 'x'

我找不到解决方案,不知道该问谁! 如果您有解决方法或解决方案/建议,请告诉我。 谢谢!


i tried installing Redis on osx 10.7 via homebrew in bash and I get the following error:

==> Downloading http://redis.googlecode.com/files/redis-2.6.9.tar.gz
Already downloaded: /Library/Caches/Homebrew/redis-2.6.9.tar.gz
==> make -C /private/tmp/redis-wQAX/redis-2.6.9/src CC=cc
Error: Permission denied - /usr/local/var/db

Redis is not installed from what i can tell.

$ ps -aux | grep redis
ps: No user named 'x'

I cannot find the solution and don't know who to ask! Please let me know if you have workaround or solution/suggestion to this. Thank you!


原文:https://stackoverflow.com/questions/14498885
更新时间:2023-11-17 15:11

最满意答案

每当某个服务器端处理程序尝试读取或写入会话时,会触发Session_Start事件。 您可以尝试使用IRequiresSessionState标记界面装饰您的处理程序:

public class MyHandler: IHttpHandler, IRequiresSessionState
{
    ...
}

The Session_Start event is trigerred whenever some server side handler attempts to either read or write to the session. You might try decorating your handler with the IRequiresSessionState marker interface:

public class MyHandler: IHttpHandler, IRequiresSessionState
{
    ...
}

相关问答

更多
  • 魔术......这种叫做“ 自动事件连线”的机制,和你写的一样 Page_Load(object sender, EventArgs e) { } 在你的代码隐藏和方法将自动被称为加载页面时。 System.Web.Configuration.PagesSection.AutoEventWireup属性的MSDN描述 : 获取或设置一个值,该值指示ASP.NET页面的事件是否自动连接到事件处理函数。 当AutoEventWireup为true ,处理程序将根据其名称和签名自动绑定到运行时的事件。 对 ...
  • 每当某个服务器端处理程序尝试读取或写入会话时,会触发Session_Start事件。 您可以尝试使用IRequiresSessionState标记界面装饰您的处理程序: public class MyHandler: IHttpHandler, IRequiresSessionState { ... } The Session_Start event is trigerred whenever some server side handler attempts to either read or ...
  • 您无法从Session_End访问cookie,因为Session_End不会从用户请求中触发,这意味着它无法读取存储在用户浏览器中的内容。 但是您可以在Session对象上存储一些数据: //Inside your controller Session["YourData"] = "Some value"; 然后在Session_End事件上获取它: void Session_End(object sender, EventArgs e) { var someValue = (string)Se ...
  • 大多数情况下,您可以在IIS日志中获取有关请求的信息。 您可以使用提供类似SQL功能的logparser来查询您想要的内容。 要向IIS日志添加更多信息,可以使用Response.AppendToLog 要捕获应用程序的所有请求,您可以使用Global.asax的Application_BeginRequest事件 Most of the time you would be able to get the information about the request in the IIS logs. You ...
  • 我会在Session_Start设置一个标志,告诉“发生错误时不要重定向”,如下所示: void Session_Start(object sender, EventArgs e) { Application["DoNotRedirectOnError"] = true ... // All sorts of user-related stuff Application["DoNotRedirectOnError"] = false } 然后在错误处理中,检查该标志并使用Serve ...
  • 这真的取决于你的使用场景。 例如订阅的频率,通知的时间。 一个简单的可能会是,你有一个合理的订阅频率,你的服务器可以单独(同步)处理每个通知,并且你想在他们订阅后立即通知他们。 将通知功能编码为接受订阅的页面范围之外的独立通知功能。 原因是你可以在页面/控件中重用它们。 一个简单的方法是将代码放在“/ app-code”文件夹中。 通过您创建的任何订阅按钮的on_click事件触发该功能。 我假设你将执行必要的验证并返回适当的响应。 如果上述需求足够,我不会进入其他场景。 It really depends ...
  • 你需要的是一个Lazy Singleton作为你的SessionFactory。 您调用方法来获取会话工厂,并检查会话是否已存在。 因此,创建会话工厂的昂贵任务是在有人需要时首次完成 。 你可以这样做: public ISessionFactory GetSessionFactory() { // sessionFactory is STATIC if (sessionFactory == null) { global::NH ...
  • 使用模块具有易于移除的优点,您需要做的就是将其从配置中的中删除。 就您的数据而言,请尝试使用Server.Transfer或Server.RewritePath - 这将保留所有当前数据(包括上次服务器错误)。 如果由于某种原因它清除了最后一个错误,您可以在传输/重写之前将错误保存到HttpContext.Items ,然后再检索它。 编辑:为了响应您的编辑,IHttpModule附加到其IHttpModule.Init实现中的任何适当事件。 Using a module has ...
  • 您可以通过以下方式从请求中获取URL: this.Context.Request.Url 从这里你可以确定地址,包括应用程序的端口号。 I ended up putting my code in the Global.asax's Application_BeginRequest event. string url = this.Context.Request.Url.AbsoluteUri.Replace(this.Context.Request.Url.PathAndQuery, str ...
  • 在自定义模块的init中,您需要检索Session模块并为Start事件添加事件处理程序。 public void Init(HttpApplication context) { context.BeginRequest += new EventHandler(Begin_Request); IHttpModule sessionModule = context.Modules["Session"]; if(sessionModule != null && sess ...

相关文章

更多

最新问答

更多
  • 获取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的基本操作命令。。。