Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault while installing Cursor #491

Closed
thequantumquirk opened this issue Apr 25, 2024 · 19 comments · Fixed by #494
Closed

Segfault while installing Cursor #491

thequantumquirk opened this issue Apr 25, 2024 · 19 comments · Fixed by #494

Comments

@thequantumquirk
Copy link

I'm trying to install Cursor AppImage but I'm getting

 ◆ "CURSOR": starting installation script
/opt/am/modules/install.am: line 122: 141215 Segmentation fault      $SUDOCOMMAND ./$arg
 "CURSOR" INSTALLED (164 MB OF DISK SPACE)  

However I tried installing some other app (duf) and it worked fine

OS: Arch
Kernel: Linux 6.8.7-zen1-1-zen

Methods followed to Install:

am -d cursor && am -i cursor
@ivan-hc
Copy link
Owner

ivan-hc commented Apr 25, 2024

is AM updated to the last version?

@thequantumquirk
Copy link
Author

is AM updated to the last version?

Yeah (its on v6.6.2-2) I installed it just today

@ivan-hc
Copy link
Owner

ivan-hc commented Apr 25, 2024

is the app in place?
are all files where they should be?
are you the only user of the system?

@thequantumquirk
Copy link
Author

thequantumquirk commented Apr 25, 2024

is the app in place?

App in the sense cursor or AM?

AM is in place but cursor is not

are all files where they should be?

Yeah all files are in place iirc and that's why duf got installed successfully

Here's the tree of /opt/am

/opt/am
├── APP-MANAGER
├── appman
├── libs-list
├── list
├── modules
│   ├── clean.am
│   ├── database.am
│   ├── devtools.am
│   ├── download.am
│   ├── files.am
│   ├── help.am
│   ├── install.am
│   ├── launcher.am
│   ├── no-updates.am
│   ├── nolibfuse.am
│   ├── remove.am
│   ├── rollback.am
│   ├── sandboxes.am
│   ├── sync.am
│   ├── template.am
│   └── update.am
├── options
├── remove
└── x86_64-apps

2 directories, 23 files

are you the only user of the system?

Yeah I'm the only user on the system

@ivan-hc
Copy link
Owner

ivan-hc commented Apr 25, 2024

try to re-install it directly instead of downloading the scripts, let we see if something changes. On my side it has been installed without problems.

@ivan-hc
Copy link
Owner

ivan-hc commented Apr 25, 2024

I can't reproduce the issue

Istantanea_2024-04-25_19-55-05 png

@thequantumquirk
Copy link
Author

try to re-install it directly instead of downloading the scripts, let we see if something changes. On my side it has been installed without problems.

I reinstalled AM as well and tried to install cursor directly with am -i cursor

now I get this

/opt/am/modules/install.am: line 31: /opt/am/.cache/install-args: Permission denied
/opt/am/modules/install.am: line 32: /opt/am/.cache/install-args: Permission denied
tail: cannot open '/opt/am/.cache/install-args' for reading: No such file or directory

I also did change the ownership of /opt/am to my user with sudo chown username /opt/am

@ivan-hc
Copy link
Owner

ivan-hc commented Apr 25, 2024

permissions are related to the file /opt/am/.cache/install-args in the directory /opt/am/.cache, you can't change the permissions also in the other subdirectories like this

@thequantumquirk
Copy link
Author

permissions are related to the file /opt/am/.cache/install-args in the directory /opt/am/.cache, you can't change the permissions also in the other subdirectories like this

I have also did chmod to all the files now I get the same segfault

@ivan-hc
Copy link
Owner

ivan-hc commented Apr 25, 2024

Be sure that you have not the INSTALL script in your $HOME and then remove/reinstall AM

am -R am
wget https://raw.githubusercontent.com/ivan-hc/AM/main/INSTALL && chmod a+x ./INSTALL && sudo ./INSTALL

it should not act like this

@thequantumquirk
Copy link
Author

 💀 ERROR: you are not the owner of /opt/am, so you cannot use "AM"
--------------------------------------------------------------------------
 The user that have installed "AM" on this system is "root"
 you are only allowed to use the installed apps, not to manage them.

How exactly should I fix this? Isn't sudo chown username /opt/am the right way?

@ivan-hc
Copy link
Owner

ivan-hc commented Apr 25, 2024

yes, AM have a check like this to find the name of the owner of /opt/am (that is set up at first installation)

ls -ld /opt/am | awk 'NR==1 {print $3}'

if the name is not the yours, you can't use AM.

This is something we are working right now on another branch #489

The best way is to install AM for the first time, but if you can't remove it, run the command

sudo /opt/am/remove

and then reinstall.

@thequantumquirk
Copy link
Author

thequantumquirk commented Apr 25, 2024

yes, AM have acheck like this to find the name of the owner of /opt/am (that is set up at first installation)

ls -ld /opt/am | awk 'NR==1 {print $3}'

if the name is not the yours, you can't use AM.

This is something we are working right now on another branch #489

The best way is to install AM for the first time, but if you can't remove it, run the command

sudo /opt/am/remove

and then reinstall.

I'm not sure why but it always gets installed as root as the owner
what can I do?
I manually changed the ownership and I get segfault

@ivan-hc
Copy link
Owner

ivan-hc commented Apr 25, 2024

This is a check I've implemented in these two days due to another issue #466 , now we are working to get rid of it.

In the meantime I suggest to use AppMan. I'll keep you updated in case I have news.

@thequantumquirk
Copy link
Author

Alright I'm closing the issue then
Thanks for the help

@thequantumquirk
Copy link
Author

Nevermind the actual issue is there was an existing Cursor config when am tries to create a new one, it segfaults

@ivan-hc ivan-hc reopened this Apr 29, 2024
@ivan-hc
Copy link
Owner

ivan-hc commented Apr 29, 2024

@thequantumquirk I've not understand

@thequantumquirk
Copy link
Author

There were some left over configs of my previous cursor install (which I downloaded from cursor.sh manually) in ~/.config directory. I removed it now cursor got installed properly.

@ivan-hc
Copy link
Owner

ivan-hc commented Apr 29, 2024

Thank you

@ivan-hc ivan-hc closed this as completed Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants