由于IBM_DB模块,尝试运行节点JS服务器时的malloc错误

发布于 2025-01-31 11:58:22 字数 591 浏览 4 评论 0原文

我有一个nodejs应用程序,并配置为在端口5001上运行。当我尝试使用 node server.js 运行节点服务器时,它会给我带来一个malloc错误,例如

node(6080,0x1067aa600) malloc: *** error for object 0x7ffb503d2670: pointer being freed was not allocated
node(6080,0x1067aa600) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort      node server.js

我的计算机配置 下方 处理器-2.4 GHz 8核Intel Core i9 内存-32 GB 2667 MHz DDR4

当我尝试运行此服务器时,我不会运行任何其他节点服务器。我还检查了所有运行的过程,但没有任何冲突。也许我缺少一些东西。我也尝试在不同端口上运行它,但是我遇到了相同的错误,

我的节点JS版本为v14.16.1

npm版本是6.14.12

xcode版本是13.4.0.0.0.1.1.1651278267

I have a nodejs application, and configured to run on port 5001. When I try to run the node server using node server.js, it throws me an malloc error like below

node(6080,0x1067aa600) malloc: *** error for object 0x7ffb503d2670: pointer being freed was not allocated
node(6080,0x1067aa600) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort      node server.js

My machine configs are
Processor - 2.4 GHz 8-Core Intel Core i9
Memory - 32 GB 2667 MHz DDR4

When I try to run this server, I do not run any other node server. I also checked all the processes running but nothing clashes with it. Maybe I am missing something. I tried running it on different ports as well, but i get the same error

My node js version is v14.16.1

npm version is 6.14.12

Xcode version is 13.4.0.0.1.1651278267

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

柳若烟 2025-02-07 11:58:22

该问题与X代码或节点版本无关,但它与我使用的NPM软件包有关,该软件包是IBM_DB,并且只有当您拥有Mac Monterey OS时。

如果您安装了此软件包以纠正错误,请按照以下步骤操作。

  1. 从您的项目中删除IBM_DB软件包,并删除软件包 - 洛克。
  2. 当前安装最新的IBM_DB软件包2.8.1。即使无法解决错误,也要执行最后一步。
  3. 转到node_modules/ibm_db/installer/clidriver/lib,然后重命名文件 libstdc ++。6.dylib libstdc ++。7.dylib

您可以在此处找到详细的讨论
https://github.com/ibmdb/node-ibm_ibm_db/issues/824

希望该问题能够解决。谢谢

The issue was not related with X code or node version but it was related to one the npm package I was using which was ibm_db and only if you have the mac monterey os.

Follow these step if you have this package installed to rectify the error.

  1. Delete ibm_db package from your project and delete package-lock.json as well.
  2. Install latest ibm_db package currently 2.8.1. Even if it does not resolve the error, do the last step.
  3. Go to node_modules/ibm_db/installer/clidriver/lib and rename the file libstdc++.6.dylib to anything like libstdc++.7.dylib

You can find detailed discussion here
https://github.com/ibmdb/node-ibm_db/issues/824
https://github.com/ibmdb/node-ibm_db/issues/801

Hopefully the issue will be resolved. Thanks

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文