Forums

Can't install as non-root

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Can't install as non-root

Postby Keith.S.Thompson » Thu Sep 27, 2012 2:04 pm

I'd like to install Cobra on my system (Ubuntu 12.04) in a specific directory without using root access. For most software packages I install from source, I can do this by running something like:

Code: Select all
./configure --prefix=/wherever/I/want
make
make install


Cobra obviously uses a different build and installation system -- which is fine if it lets me do the same thing.

I downloaded and unpacked Cobra-0.9.0.tar.gz and followed the instructions.

If I want to install Cobra in a non-default location (say, somewhere under /usr/local), it looks like I have to create "install-directory.text", but that's not at all obvious from the documentation.

When I ran "install-from-workspace", it told me:

Code: Select all
==== Verify running as admin user

** ERROR: Please run this executable as an admin user.
Need help with the above error?
 * Make sure you ran with sudo or as root.
Keith.S.Thompson
 
Posts: 1

Re: Can't install as non-root

Postby nerdzero » Thu Sep 27, 2012 9:58 pm

Charles may have a better suggestion, but you can do this from the 'Source' directory wherever you unpacked the Cobra source:

Code: Select all
./bin/build
./cobra -build-standard-library

The first command creates cobra.exe, the second one creates Cobra.Core.dll. Then, copy the compiled assemblies wherever you like and then compile/run cobra source code by executing:

Code: Select all
./cobra.exe filename

If you don't use the installer, you have to manually add Cobra.Core to the gac and optionally put cobra.exe (or a launch script) in your path. Also, the installer compiles Cobra using some options for improved performance.

Another way might be using the installer with sudo to get the optimized build and then just move the installation after the fact.
Code: Select all
sudo mv /usr/local/cobra /some/other/path/

Then update the launch script at /usr/loca/bin/cobra with the new location of cobra.exe and chmod the new folder. I haven't tried the second way but it seems like it would work. Of course, you would need sudo access on the system for the second way to work.
nerdzero
 
Posts: 286
Location: Chicago, IL

Re: Can't install as non-root

Postby Charles » Thu Sep 27, 2012 10:29 pm

I agree with Keith's feedback. It should be a command line option. Also, we can probably test write permissions and only complain about admin/sudo if writing is blocked.

Furthermore install-directory.text should really be install.config with key value pairs. Btw the reason that was added was for a user with a subversion workspace. They wanted to specify the install directory once and not have to do it each time they updated and installed. Of course, that could apply to any option.
Charles
 
Posts: 2515
Location: Los Angeles, CA


Return to Discussion

Who is online

Users browsing this forum: No registered users and 17 guests