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

  • SEARCH
  • Home
  • 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 6238609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:14:45+00:00 2026-05-24T11:14:45+00:00

This is the first time I install a library. I followed the instructions here

  • 0

This is the first time I install a library. I followed the instructions here. It’s from an online course on programming.

I’m not very Unix savvy. When I tried to compile one of the sample c files, one that #includes the cs50.h file, I get:

cc1: error: /usr/local/include: not a directory

Also, if I write cd /usr/local/include or cd /usr/local/lib, it tells me it’s not a directory again, even though when I ls /usr/local they both show up.

Any ideas?

  • 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-24T11:14:46+00:00Added an answer on May 24, 2026 at 11:14 am

    Given that the instructions in the header are:

    • To compile as a static library on your own system:
    • % gcc -c -ggdb -std=c99 cs50.c -o cs50.o
    • % ar rcs libcs50.a cs50.o
    • % rm -f cs50.o
    • % cp cs50.h /usr/local/include
    • % cp libcs50.a /usr/local/lib

    Note the use of ‘%’ as a prompt. It indicates that the operations should be done as root.

    Unless your system is misconfigured, you will need to use root privileges to copy the files into the directories under /usr/local. For example, you might use sudo as a prefix to the commands:

    sudo cp cs50.h /usr/local/include
    sudo cp libcs50.a /usr/local/lib
    

    We can deduce (with fairly high confidence) that you did not already have directories /usr/local/include and /usr/local/lib, and that you now have two files (not directories) called:

    • /usr/local/include that contains the header cs50.h
    • /usr/local/lib that contains the static library

    You should validate this observation with ls -l /usr/local and perhaps file /usr/local/*. Then you should remove the files, create the directories, and copy the files into the newly created directories.

    The only thing this explanation does not account for is the missing leading slash in the error message (which originally said ‘cc1: error: usr/local/include: not a directory‘). At the moment, I put that down to a transcription error in asking this question. (And a comment and edit confirms that diagnosis.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first time using authentication library. I followed this post to install
This is my first time attempting to call an ASP.NET page method from jQuery.
this is my first time posting here, I have a question which I have
Now this is my first question here. I'm trying to install Ruby On Rails
I am trying to install elastic plugin. This is first time i am installing
It's not the first time I install Android SDK on several machines. It did
This is my first time using joomla. I don't know if I'm using the
This is my first time with Web services. I have to develop web services
This is my first time on StackOverflow though I read Coding Horror quite often.
This is the first time I'm creating an open-source project, and I've decided (based

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.