lesgourg / class_public

Public repository of the Cosmic Linear Anisotropy Solving System (master for the most recent version of the standard code; GW_CLASS to include Cosmic Gravitational Wave Background anisotropies; classnet branch for acceleration with neutral networks; ExoCLASS branch for exotic energy injection; class_matter branch for FFTlog)
230 stars 285 forks source link

./class explanatory.ini code showing error. #428

Closed trupti1729 closed 3 years ago

trupti1729 commented 3 years ago

./class explanatory.ini error: bash: ./class: Permission denied Screenshot from 2021-06-21 14-46-27 I tried with sudo ./class explanatory.ini it shows ./class: command not found

Can someone help me with this? Where could have I gone wrong?

pstoecker commented 3 years ago

Have you checked whether class is marked as an executable file? If it is not, you have to enable it with chmod u+x ./class

trupti1729 commented 3 years ago

I tried sudo chmod u+x ./class then sudo ./class explanatory.ini I get the same error as sudo: ./class: command not found

pstoecker commented 3 years ago

Ok. I have somehow anticipated that.

Judging from the screenshot it seems that you use class on a external hard drive. Most of the times external hard drives are formatted in a way that they can be recognised by windows. These formats may, however, be in conflict with the file permissions that Linux expects. Could you check whether you have writing access to the class folder and its subfolders? If not you will have to fix it (if at all possible).

One solution might be to format a part of the hard drive as ext4. than there should be no problem with file permissions as this is a native linux filesystem format. But maybe you do not need to do that.

trupti1729 commented 3 years ago

okay. How do I uninstall Class from harddrive So that I can reinstall it in SSD?

pstoecker commented 3 years ago

It should be enough to just delete the folder on the hard drive. class does not place any files outside of this folder like /usr/bin and so on. The only exception is the shared python library of classy within ~/.local/lib/pythonX.Y/site-packages/ in case that you also built that. This would get overriden once you compiled class on your SSD.

trupti1729 commented 3 years ago

Thank you Sir. I'll do that.