LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-30-2018, 06:37 AM   #1
Drosera_capensis
Member
 
Registered: Jun 2018
Posts: 153

Rep: Reputation: Disabled
Install gdrive, and general question about executables


Hello everyone, I have a question related to the installation of gdrive.

I am following the tutorial located at this address:
https://github.com/prasmussen/gdrive

On my system, the file gdrive-linux-arm64 has to be downloaded.
Afterward, this file has to be converted as an executable, following this text:

"Download gdrive from one of the links below. On unix systems run chmod +x gdrive after download to make the binary executable. The first time gdrive is launched (i.e. run gdrive about in your terminal not just gdrive)"

So, does it mean that the command
Code:
gdrive about
has to be typed to execute the file? Or is it the command
Code:
gdrive-linux-arm64 about
? Both are actually not working in my case.

A more general question: What command activate an executable file?
 
Old 10-30-2018, 07:03 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Both are actually not working in my case
This is a very general description of an error. Can you be more precise? How do you know it's not working? What do you expect to happen, and what actually happens?

To execute, i.e. run, a file, it needs to fulfill a few conditions.

It must be in an executable format. That seems to be the case here.
It must have the execution flag set. The chmod command takes care of that.
It must be placed in a location where the system finds it. I suspect this is the crux in your case.

Like Windows, UNIX and Linux have a so-called execution path, a list of all the directories (Windows term: folders) that will be searched when a program is to be executed. If your program is not in one of those directories, it can't be executed just by typing its name.

You have two choices. Either move the file to a place where it can be executed. The execution path is in the variable PATH; to display it:
Code:
echo $PATH
The second choice is providing the file's directory path. If the file is named gdrive and resides in your home directory, you can do this:
Code:
cd
./gdrive about
or that
Code:
/home/YOURACCOUNTNAME/gdrive about
Oh, and the third choice is to add the directory where the file resides to the PATH. Not necessarily a good choice though, so I won't explain how it's done.

Last edited by berndbausch; 10-30-2018 at 07:05 AM.
 
Old 10-30-2018, 08:46 AM   #3
Drosera_capensis
Member
 
Registered: Jun 2018
Posts: 153

Original Poster
Rep: Reputation: Disabled
Hello berndbausch, thanks for your answer!

In this case the path or file location is not in cause, as I am located in the directory containing the executable file.

Even though, I have tried different approaches:

Code:
gdrive-linux-x64
or

Code:
/home/user/Downloads/gdrive-linux-x64
In both cases the result is "command not found"

Does it mean that my file is actually not executable, or that I have to use a command to run it?
 
Old 10-30-2018, 09:12 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
What is the output of
Code:
ls -l /home/user/Downloads/gdrive-linux-x64
?

And how did the arm file from your original post turn into an x64 file?
 
Old 10-30-2018, 09:53 AM   #5
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,726

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by Drosera_capensis View Post
Hello berndbausch, thanks for your answer!

In this case the path or file location is not in cause, as I am located in the directory containing the executable file.

Even though, I have tried different approaches:

Code:
gdrive-linux-x64
or

Code:
/home/user/Downloads/gdrive-linux-x64
In both cases the result is "command not found"

Does it mean that my file is actually not executable, or that I have to use a command to run it?
The instructions you posted said to run
Code:
gdrive about
so, from within the directory where the file gdrive is located
Code:
./gdrive about
or, from elsewhere
Code:
/home/user/Downloads/gdrive about
To follow on to berndbausch's suggestion, let us see
Code:
ls -ltr /home/user/Downloads/gdrive*
 
Old 10-30-2018, 10:11 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
Quote:
Originally Posted by Drosera_capensis View Post
In this case the path or file location is not in cause, as I am located in the directory containing the executable file.
In windows probably it works, but in Linux by default the current dir is not in the search PATH, so executables cannot be found even in the current directory - if it was not explicitly set.

Quote:
Originally Posted by Drosera_capensis View Post
Code:
gdrive-linux-x64
or
/home/user/Downloads/gdrive-linux-x64
In both cases the result is "command not found"

Does it mean that my file is actually not executable, or that I have to use a command to run it?
that means the directory is not looked for executables, so you need to tell the os where are they located.
That's why you need to specify a directory (relative or absolute) as it was suggested.

But we still do not know what was actually and exactly made, so hard to tell you the exact solution. Tthat's why we want to se the result of:
Code:
ls -ltr /home/user/Downloads/gdrive*
 
Old 10-30-2018, 11:10 AM   #7
Drosera_capensis
Member
 
Registered: Jun 2018
Posts: 153

Original Poster
Rep: Reputation: Disabled
Thank you all for your suggestions and support.

Please forget the "gdrive-linux-arm64" file, I have mistyped the file name from the Github page.

Using the following command:
Code:
ls -ltr /home/user/Downloads/gdrive*
It yields this line:
Code:
-rwxrwxr-x 1 user user 7805504 Oct 30 11:21 /home/user/Downloads/gdrive-linux-x64
However, using:

Code:
/home/user/Downloads/gdrive-linux-x64 about
I got information on the googledrive account targeted, although it is not running the file.
Would you have any idea why? Are the commands not supposed to be before the filename, and not after?

Last edited by Drosera_capensis; 10-30-2018 at 11:12 AM.
 
Old 10-30-2018, 11:44 AM   #8
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,726

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Now that you have it running/working, you need to go back to the documentation to learn how to use it. We don't need to read that for you.

Running it with the about option is probably doing what it's supposed to do.
 
Old 10-30-2018, 12:22 PM   #9
Drosera_capensis
Member
 
Registered: Jun 2018
Posts: 153

Original Poster
Rep: Reputation: Disabled
The tutorial quote that a password and a verification code were requested, and I was wondering why it didn't showed up in my case.

After further inquiries, it seems that another user on my machine has already entered the code, so I found my answer here.

Now, the logic of having the "about" command after the filename when all the other commands are supposed to come first, it still escapes me.

Last edited by Drosera_capensis; 10-30-2018 at 12:27 PM.
 
Old 10-30-2018, 04:40 PM   #10
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by Drosera_capensis View Post

Now, the logic of having the "about" command after the filename when all the other commands are supposed to come first, it still escapes me.
What other commands?

about is a parameter of the gdrive command. On the command line, a parameter comes after the command. If you typed
Code:
about gdrive
you would run a command named about with a parameter gdrive.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Debian install general question re; wifi offgridguy Debian 31 10-10-2016 07:02 PM
[SOLVED] Question about executables/binaries Driverman Linux - General 11 06-17-2013 06:59 AM
I have a question about binary executables trist007 Linux - Newbie 7 06-28-2008 01:29 AM
Who should own files in /usr/local (and executables, libraries in general)? erika_Dec2004 Linux - Newbie 5 01-12-2005 10:56 PM
Question about Executables fotwoca Linux - Newbie 5 01-24-2002 05:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration