Solution to Msg.exe “Error 5 getting session names”

本文解决了一台Windows Server 2008 R2机器无法向另一台Windows 7机器发送消息的问题。通过修改注册表中的AllowRemoteRPC值并重启计算机,成功实现了msg通信。

Info
My Windows-Server 2008 R2 machine couldn’t msg my Windows 7 box due to Error 5 getting session names.
I found the solution here, in a comment made by Consoles. I reblog it so it can be found easier.

It turns out it has nothing to do with not being on the same domain or whatever. It is due to a setting related to Terminal Server.
That’s not to miraculous, since msg.exe is designed for messaging to terminal users.

So, changing a simple registry value and rebooting makes it all work again.

Solution
On the machine that you cannot message to:
Use regedit to navigate to: HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server
Then change the following value:

Name : AllowRemoteRPC
Type : REG_DWORD
Value : 1

Reboot. Now it should work.

 

 【以上转载自http://blog.umito.nl/2010/02/20/solution-to-msg-exe-error-5-getting-session-names.html

 

经过测试,在windows 7的机器上可以实现msg通信。

msg jhu1 /server:cnsh2wjhu1 hello

### 构建 Wheel 时可能出现的错误及其解决方案 在构建 Python 的 wheel 文件过程中,可能会遇到各种类型的错误。以下是针对 `build wheel` 错误的一些常见原因以及相应的解决方案。 #### 常见错误分析 如果在执行 `python setup.py bdist_wheel` 或类似的命令时发生错误,通常可能是由于以下几个原因之一引起的: 1. **配置文件缺失或不完整** 如果项目的 `setup.cfg` 配置文件中缺少必要的字段(如 `name`, `version` 等),则会引发解析错误。例如,在引用中的描述提到过类似问题:“Error parsing /home/XXX/rpmbuild/BUILD/autoinstall-1.0/setup.cfg: KeyError: 'name'”[^2]。这表明项目缺少必需的关键字参数。 2. **依赖项未满足** 当某些依赖库尚未正确安装或者版本不符合需求时,也可能导致构建失败。比如 PyCurl 库可能需要特定版本才能正常工作,因此建议按照官方推荐的方式下载适合当前 Python 版本的二进制包[^3]。 3. **环境变量设置不当** Windows 平台下尤其需要注意编译器路径等相关环境变量是否已正确定义;Linux 和 macOS 用户也应确认 GCC 工具链可用性良好。 #### 解决方案详解 ##### 方法一:完善 Setup Configuration File 确保您的 `setup.py` 及其关联的 `.cfg` 文件包含了所有必要信息。可以参照如下模板来创建基本结构: ```python from setuptools import setup, find_packages setup( name="your_project_name", version="0.1.0", packages=find_packages(), install_requires=[ "requests>=2.28.1", "numpy==1.23.*" ], ) ``` ##### 方法二:验证并更新所需外部模块 对于像 PycURL 这样的 C 扩展组件,最好先通过预编译好的.whl 文件简化安装流程。具体操作步骤如下所示: 1. 访问 https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycurl 页面; 2. 查找适用于您本地解释器架构 (e.g., cp39 表示兼容Python 3.9) 的最新发行版链接; 3. 使用 pip 将该 .whl 资源加载到环境中 (`pip install path\to\downloaded_file.whl`)。 ##### 方法三:调整操作系统级别的支持条件 有时还需要额外准备一些系统级前置资源,例如 OpenSSL 开发头文件等。Ubuntu 类 Linux 发行板可通过运行下面指令获取它们: ```bash sudo apt-get update && sudo apt-get install build-essential libssl-dev python3-dev ``` --- ### 总结 综上所述,当面对 “Build Wheel Error Requirements Solution”的挑战时,可以从检查 setup script 参数完整性、适配第三方扩展程序至目标平台特性等多个角度切入排查潜在隐患,并采取针对性措施加以修复。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值