如何在 Linux 更新 2024 上安装 Cursor AI 编辑器

2025-05-25

如何在 Linux 更新 2024 上安装 Cursor AI 编辑器

Cursor 是一款 AI-first 的代码编辑器,可以在 Windows、Mac 和 Linux 平台上下载,旨在与 AI 进行结对编程,旨在帮助开发人员更快、更有效地创建软件。

我在 Mac 上安装了 Cursor 并开始使用。在 Mac 上安装很简单,但在 Ubuntu Linux 上安装却极其困难。

不过,在网上查了些资料后,我终于搞清楚了如何安装 Ubuntu Linux。以下是我让电脑光标正常操作的步骤。

Cursro AI 编辑器

  • 步骤 2下载完成后,下载文件夹中将出现一个扩展名为.AppImage的文件

等一下,“.AppImage”扩展名是什么?

AppImage是一种通用的软件包格式,不需要常规的安装方法就可以在Linux上安装。

  • 步骤 3不要立即点击它!为了使文件正常运行,我们必须首先使其可执行。要使文件可执行,请转到“下载”文件夹(或下载 Cursor 软件的位置)并执行此命令。
chmod +x cursor-0.42.4x86_64.AppImage
Enter fullscreen mode Exit fullscreen mode

cursor-0.42.4x86_64 是我从 Cursor 网站获取的文件的名称,但您的文件名可能有所不同,只需将文件的名称替换为上面的命令,仅在 +x 之后替换

如果此时遇到问题,请继续执行步骤 4。如果没有遇到此错误,则可以跳过步骤 4

./cursor-0.42.4x86_64.AppImage
dlopen(): error loading libfuse.so.2

AppImages require FUSE to run. 
You might still be able to extract the contents of this AppImage 
if you run it with the --appimage-extract option. 
See https://github.com/AppImage/AppImageKit/wiki/FUSE 
for more information
Enter fullscreen mode Exit fullscreen mode

到底是怎么回事?这个错误是什么?别慌!

错误消息表明 .AppImage 需要运行 FUSE 才能修复此问题,而 FUSE 是类 Unix 操作系统的一种机制,允许非特权用户在不编辑内核代码的情况下创建自己的文件系统。
这是通过在用户空间运行文件系统代码来实现的,而 FUSE 内核模块仅提供与实际内核接口的“桥梁”。

  • 步骤 4安装 libfuse2
sudo apt-get install libfuse2
Enter fullscreen mode Exit fullscreen mode
  • 步骤 5安装 libfuse2 后,再次运行此命令
chmod +x cursor-0.42.4x86_64.AppImage
Enter fullscreen mode Exit fullscreen mode
  • 第 6 步太棒了!现在,您可以通过从终端运行命令或直接从“下载”文件夹打开 Cursor 文件来运行 .AppImage 文件。
./cursor-0.42.4x86_64.AppImage
Enter fullscreen mode Exit fullscreen mode

按照以下步骤将 Cursor 添加到您的应用程序列表

如何将光标应用添加到已安装的应用程序列表中

按照以下步骤将 Cursor 添加到您的应用程序列表

  • 将应用程序从下载文件夹移至opt文件夹
sudo mv cursor-0.42.4x86_64.AppImage /opt/cursor.appimage
Enter fullscreen mode Exit fullscreen mode
  • 通过运行命令为 Cursor创建桌面条目
sudo nano /usr/share/applications/cursor.desktop
Enter fullscreen mode Exit fullscreen mode
  • 在您刚刚创建的文件中粘贴以下内容
[Desktop Entry]
Name=Cursor
Exec=/opt/cursor.appimage
Icon=/opt/cursor.png
Type=Application
Categories=Development;
Enter fullscreen mode Exit fullscreen mode
  1. 保存文件
ctl + x  
Enter fullscreen mode Exit fullscreen mode

然后

press y 
Enter fullscreen mode Exit fullscreen mode

然后

press enter
Enter fullscreen mode Exit fullscreen mode

作为最后一步,我们应该为应用程序添加一个图标,以便您可以将其与其他应用程序区分开来

由于我们将应用程序移动到了/opt目录,因此也请将 .png 图像添加到 /opt 目录中

图像文件应cursor.png按照我们创建桌面条目时定义的命名。

光标正在工作并有自定义图标

如果您已完成所有步骤,但应用程序图标未显示“注销”,则请重新登录

就是这样,谢谢阅读:)

文章来源:https://dev.to/mhbaando/how-to-install-cursor-the-ai-editor-on-linux-41dm
PREV
从头开始创建最小 NestJS 应用程序的 5 个步骤!
NEXT
6 个 GitHub 仓库,助您快速提升知识