Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6348333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:23:59+00:00 2026-05-24T21:23:59+00:00

I downloaded, compiled, and installed the GNU Scientific Library (gsl) on my mac, which

  • 0

I downloaded, compiled, and installed the GNU Scientific Library (gsl) on my mac, which locates /usr/local/include/gsl as default.

To test it, I have tried to compile and execute the example C program (found from gsl document).

 #include <stdio.h>
 #include <gsl/gsl_statistics.h>

 int
 main(void)
 {
   double data[5] = {17.2, 18.1, 16.5, 18.3, 12.6};
   double mean, variance, largest, smallest;

   mean     = gsl_stats_mean(data, 1, 5);
   variance = gsl_stats_variance(data, 1, 5);
   largest  = gsl_stats_max(data, 1, 5);
   smallest = gsl_stats_min(data, 1, 5);

   printf ("The dataset is %g, %g, %g, %g, %g\n",
          data[0], data[1], data[2], data[3], data[4]);

   printf ("The sample mean is %g\n", mean);
   printf ("The estimated variance is %g\n", variance);
   printf ("The largest value is %g\n", largest);
   printf ("The smallest value is %g\n", smallest);
   return 0;
 }

To compile it,

$ gcc -I /usr/local/include -c example.c

$ ls

example.c example.o

And, to execute it,

$ ./example.o

-bash: ./example.o: Permission denied

What’s happening? Who can run it other than me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:24:00+00:00Added an answer on May 24, 2026 at 9:24 pm

    example.o is an object file, not an executable.

    According to the documentation (info gsl-ref to read it), this should work (or at least it’s close).

    $ gcc -Wall -I/usr/local/include -c example.c
    $ gcc -L/usr/local/lib example.o -lgsl -lgslcblas -lm -o example
    $ ./example
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have downloaded, compiled and installed so far: apr-1.3.9 apr-util-1.3.9 sqlite-3.6.23 zlib-1.2.4 libtool-2.2.6b Now
I've downloaded and compiled the Microsoft detouring library. Inside my project I've included the
I have a c program which needs a library named libnuma to be installed.
I've downloaded, compiled and installed gdc from it's bitbucket repository . Then I downloaded,
Some Perl modules, such as DBI , need to be downloaded, compiled and installed
I downloaded and installed the Aptana Studio free version. But apparently, to install the
I have downloaded the source for VIM (7.3) and compiled it successfully with a
I downloaded the latest version of eclipse (3.5.SR2) and get m2eclipse installed on. Instead
I've downloaded latest source from mono project, compiled it and everything works (c# projects,
I use clisp 2.48 (2009-07-28) on Mac OS X 10.6.4. I downloaded the clisp

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.