LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-30-2017, 08:04 AM   #1
Dynosaw3
Member
 
Registered: Feb 2016
Posts: 48

Rep: Reputation: Disabled
g++ compiler cc1plus:error: /usr/local/include/...


People,
For some unknown reason, my g++ compiler will not run any more.
It gives an error message:
cc1plus: error: /usr/local/include/x86_64-linux-gnu permission denied
Also noted:
1. The directory /usr/local/include is empty. Permissions are 774.
owner is root; group is staff.
2. Running whereis gives /usr/bin/g++
3. Directory /usr/bin is full of symlinks of the sort x86_64-* which all
seem to link back to routines in /usr/bin.
4. System is here stand-alone desktop running under Debian 8.6

Can anybody please suggest what might be wrong and how I can fix it?
Thanks in advance.
Dynosaw
--
 
Old 01-30-2017, 03:40 PM   #2
Unaaaaab
Member
 
Registered: Jan 2017
Posts: 32

Rep: Reputation: Disabled
You are a newbie. To see some file as root you have deleted 'em, and some other again. You must reinstall gcc! If files are missing, this is not a complete installation! Be careful! Now if you have packet (surely!) manager use it according your distribution documentation and use a reinstall of the packet corresponding gcc. So you will solve all! Don't post similar idiocies or forum will be fullfill and we can't work!
 
Old 01-30-2017, 05:03 PM   #3
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Quote:
Originally Posted by Dynosaw3 View Post
1. The directory /usr/local/include is empty. Permissions are 774.
owner is root; group is staff.
You need to at least set the execute bit on that directory for others. On my Sid box group id is set also.
Code:
# chmod 2775 /usr/local/include
# ls -l /usr/local | grep include
drwxrwsr-x  4 root staff 4096 Jan 16  2016 include

Last edited by norobro; 01-30-2017 at 10:18 PM. Reason: had uid instead of gid
 
Old 01-31-2017, 02:40 AM   #4
Dynosaw3
Member
 
Registered: Feb 2016
Posts: 48

Original Poster
Rep: Reputation: Disabled
Norobro,
Thanks for your advice. Much appreciated. In fact setting the permissions of
/usr/local/include to 776 seems to have done the trick. From that standpoint the
matter can be closed out. But some unanswered questions do remain.
1. The directory /usr/local/include is still empty (not even a dot-file to be seen).
Why does g++ need world access to an empty directory?? Isn't /tmp (or such like)
used for interim storage?
2. Neither the SUID nor the GUID bit is set for /usr/local/include. And g++ works so
why must the GUID bit be set? Why widen the malware attack profile?

BTW:
From my "newbie" perspective the subject of SUID/GUID seems to be one big UNDOCUMENTED
can of worms. There is a sufficiency of articles expounding the Grand General Principles
of how potentially insecure the SUID and GUID bits can be; but there is a dearth of
detailed info on the web which fleshes out the the do's and don't's. And the books I have don't help either.
And don't say mechanically "The distro knows best".
Immediately after I installed Jessie, I ran iptables -S -V and found the box was wide
open to everything on internet; INPUT OUTPUT and FORWARD all ACCEPT without restriction
presumably, also during installation as well. Not even a simple --conntrack check. Nor
even a warning that the box was still unprotected and action was required.
The point here is, a couple of weeks leisurely internet research found what I needed to
set up iptables to strap down internet access, chain-by-chain, port-by-port, protocol-
by-protocol leaving no superfluous services to widen the attack profile. And a simple check
with nmap found no holes so we hope for the best.
But the SUID and GUID saga seems to be a different story. It makes me very nervous.]
Sorry, SUID/GUID is a bit off-topic but it has to be said.
--
Dynosaw
 
Old 01-31-2017, 05:36 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
if you are interested, just open a new thread about suid-guid.
/usr/local/include may contain include files, but by default it is not used. You might installed something which put some files into /usr/local/include.
2 and 3 is ok, but if you tell the exact links you found we may tell you more about that.
(in general /usr/bin/g++ is link to the real compiler, which contains a version number too. Therefore you may have different versions installed)
 
Old 02-03-2017, 03:32 PM   #6
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,602

Rep: Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084
Quote:
Originally Posted by Unaaaaab View Post
You are a newbie. [snip] Don't post similar idiocies or forum will be fullfill and we can't work!
Welcome to LQ, Unaaaaab. Please note that we aim to be welcoming to members of all technical levels, so the above behavior isn't expected here. If you have any questions, let us know.

--jeremy
 
  


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
compiler not able to find headers in /usr/include gupta.pulkit89 Linux - Mobile 0 05-03-2011 04:10 PM
please difference between /usr/include & /usr/local/include baxzius Linux - Software 2 07-09-2010 05:19 AM
changing include directories - /usr/local/include quep_fly Linux - Newbie 6 08-12-2007 04:36 PM
deleted /usr/local/include Ha1f *BSD 3 11-05-2006 08:44 AM
/usr/local/include deleted.... HappyDude Fedora 5 11-02-2004 01:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:36 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