zoglauer/megalib

"$ git clone" and "$ bash setup.sh" error

Closed this issue · 0 comments

Hey!
I am about to download and start using MEGAlib. I use Ubuntu as Linux OS, on Windows 11.

In ubuntu bash, when trying to clone using $ git clone https://github.com/zoglauer/megalib.git, i get the following output:

fatal: could not create work tree dir 'megalib': Permission denied

Than i try to use $ sudo git clone https://github.com/zoglauer/megalib.git which work's. But than, when i try to run $ bash setup.sh --branch=main i get the following output:

Setting up MEGAlib on your system
==================================================

(1) Verifying chosen configuration options:

 * Using this path to MEGAlib: /megalib/.
 * Updating MEGAlib to the latest version
 * Using MEGAlib branch main
 * Clearing the environment paths PATH, LD_LIBRARY_PATH, CPATH
 * Using this path to install external software (ROOT, Geant4):
 * Download latest compatible version of ROOT
 * Download latest compatible version of Geant4
 * Not using HEASoft
 * Using operating system architecture Linux
 * Using normal code optimization
 * Using no debugging code
 * Using this maximum number of threads: 12
 * Don't check for updates
 * Don't apply MEGAlib internal ROOT and Geant4 patches
 * Don't clean up intermediate build files

(2) Preparing the MEGAlib source code:

Making a backup of your old source code - just in case...
tar (child): SourceCodeBackupDuringMEGAlibSetup.260624.133640.tgz: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now
tar: SourceCodeBackupDuringMEGAlibSetup.260624.133640.tgz: Cannot write: Broken pipe
tar: Child returned status 2
tar: Error is not recoverable: exiting now

ERROR: Something went wrong during backing up your source code.

If i try to use $ sudo bash setup.sh --branch=main, i get the following output:

Error: For security reasons, this script is not intended to be run as superuser/root.
       It is intended for a user installation of MEGAlib.

Do you or someone have any answer for this?

Edit:
Issue -> closed: Worked after the computer and bash was restarted a multiple of times. :)