error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1
i try install pcapy, but outgoing notifications like this :
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
pcapdumper.cc:11:18: fatal error: pcap.h: No such file or directory
compilation terminated. error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1
i use ubuntu 14.04
2 Answers 2
Installing the libraries, libpcap-dev & libpq-dev solved the problem.
sudo apt-get install libpcap-dev libpq-dev
Tested on Ubuntu 16.04.
i have the same problem . on ubuntu 20.10. Basicaly the problema was. theres no python2.7 on this release . i solved doing this steps.
this part ll install general packages for python development tools on default python version. try if is solved . if not.
1 — sudo apt-get install python-dev
try install to especifically python version u r using. example if u r using python 3.6 then u ll type » sudo apt-get install python3.6-dev — y» .
2 — sudo apt-get install python3.x-dev -y
if instead not solve the problem try to remake the link on bin python directory doing like this.
Источник
Command terminated with exit status 1
Решил обновить сервер простой командой apt update; apt upgrade, но что то пошло не так.
По вылазило много ошибок:
Версия у меня стояла 17.04, дай думаю обновлюсь до версии 17.10, делаю команду
I wanted to install eventlet on my system in order to have «Herd» for software deployment.. but the terminal is showing a gcc error:
Why can’t Python.h be found?
11 Answers 11
Your install is failing because you don’t have the python development headers installed. You can do this through apt on ubuntu/debian with:
for python3 use:
For eventlet you might also need the libevent libraries installed so if you get an error talking about that you can install libevent with:
I tried all the above answers. But what worked for me was for CentOS:
For Redhat Versions(Centos 7) Use below command to install Python Development Package
Python 2.7
Python 3.4
sudo yum install python34-devel
Still if your problem not solved then try installing below packages –
sudo yum install openssl-devel
sudo yum install libffi-devel
On MacOS I had trouble installing fbprophet which requires pystan which requires gcc to compile. I would consistently get the same error: command ‘gcc’ failed with exit status 1
I think I fixed the problem for myself thus:
I used brew install gcc to install the newest version, which ended up being gcc-8
Then I made sure that when gcc ran it would use gcc-8 instead.
It either worked because I added alias gcc=’gcc-8 in my .zshrc (same as .bashrc but for zsh), or because I ran export PATH=/usr/local/bin:$PATH (see comment)
Also: all my attempts were inside a virtual environment and I only succeeded by installing fbprophet globally (with pip), but still no success inside a venv
A question can only have one accepted answer. Are you sure you want to replace the current answer with this one?
You previously marked this answer as accepted. Are you sure you want to unaccept it?
Heres answer https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/1310816
Your /etc/apt/sources.list file only has entries for the main component of the archive with http://mirrors.digitalocean.com/ubuntu/ which is not an official mirror of Ubuntu. Subsequently, the upgrade was unable to find the essential package ubuntu-minimal. You’ll need to either choose a different mirror or only use mirrors.digitalocean.com entries in your sources.list file and then respond Yes to the question about using an unofficial mirror and rewriting sources.list.
YOu should make yourself as official mirror. No? Or mirror update requirements to meet.
https://wiki.ubuntu.com/Mirrors#Country_mirror_requirements
Remember to run a normal «apt-get update && apt-get upgrade» first. Then simply answer yes to the question:
The do-release-upgrade tool checks the list of official Ubuntu mirrors before running an upgrade. DigitalOcean’s mirror is an internal mirror so it is normal to see this prompt. I’ve upgraded a number of droplet from 12.04 to 14.04 with no issue.
Looking at the extra information that you provided on the bug report, it looks like you have a virtualmin repository in you sources.list. That seems to be the real source of the problem where ubuntu-minimal can not be found.
I just spun up two 12.04 droplets. One I immediately upgraded to 14.04. There were no issues at all. The next I installed virtualmin on. When I tried to upgrade it, I hit the same problem you described. I’d suggest opening a bug/support ticket with virtualmin.
Hmmm did another image copy and update test.
Not working.
login as: root
root@188.226.178.13’s password:
Welcome to Ubuntu 12.04.4 LTS (GNU/Linux 3.8.0-29-generic x86_64)
System information as of Mon Apr 21 18:59:48 EDT 2014
System load: 0.25 Processes: 107
Usage of /: 16.8% of 19.56GB Users logged in: 0
Memory usage: 47% IP address for eth0: 188.226.178.13
Swap usage: 0%
Graph this data and manage this system at:
https://landscape.canonical.com/
0 packages can be updated.
0 updates are security updates.
*** System restart required ***
No mail.
Last login: Mon Apr 21 18:58:06 2014 from 94.30.237.154
root@perfectall:
# sudo update
sudo: update: command not found
root@perfectall:
# sudo apt-get update
Hit http://mirrors.digitalocean.com precise Release.gpg
Hit http://mirrors.digitalocean.com precise-updates Release.gpg
Hit http://mirrors.digitalocean.com precise-backports Release.gpg
Hit http://mirrors.digitalocean.com precise-security Release.gpg
Hit http://software.virtualmin.com virtualmin-precise Release.gpg
Hit http://mirrors.digitalocean.com precise Release
Hit http://mirrors.digitalocean.com precise-updates Release
Hit http://mirrors.digitalocean.com precise-backports Release
Hit http://mirrors.digitalocean.com precise-security Release
Hit http://mirrors.digitalocean.com precise/main Sources
Hit http://mirrors.digitalocean.com precise/restricted Sources
Hit http://mirrors.digitalocean.com precise/universe Sources
Hit http://mirrors.digitalocean.com precise/multiverse Sources
Hit http://mirrors.digitalocean.com precise/main amd64 Packages
Hit http://mirrors.digitalocean.com precise/restricted amd64 Packages
Hit http://mirrors.digitalocean.com precise/universe amd64 Packages
Hit http://mirrors.digitalocean.com precise/multiverse amd64 Packages
Hit http://mirrors.digitalocean.com precise/main i386 Packages
Hit http://mirrors.digitalocean.com precise/restricted i386 Packages
Hit http://mirrors.digitalocean.com precise/universe i386 Packages
Hit http://mirrors.digitalocean.com precise/multiverse i386 Packages
Hit http://mirrors.digitalocean.com precise/main TranslationIndex
Hit http://mirrors.digitalocean.com precise/multiverse TranslationIndex
Hit http://mirrors.digitalocean.com precise/restricted TranslationIndex
Hit http://software.virtualmin.com virtualmin-universal Release.gpg
Hit http://mirrors.digitalocean.com precise/universe TranslationIndex
Hit http://mirrors.digitalocean.com precise-updates/main Sources
Hit http://mirrors.digitalocean.com precise-updates/restricted Sources
Hit http://mirrors.digitalocean.com precise-updates/universe Sources
Hit http://mirrors.digitalocean.com precise-updates/multiverse Sources
Hit http://mirrors.digitalocean.com precise-updates/main amd64 Packages
Hit http://mirrors.digitalocean.com precise-updates/restricted amd64 Packages
Hit http://security.ubuntu.com precise-security Release.gpg
Hit http://mirrors.digitalocean.com precise-updates/universe amd64 Packages
Hit http://mirrors.digitalocean.com precise-updates/multiverse amd64 Packages
Hit http://mirrors.digitalocean.com precise-updates/main i386 Packages
Hit http://mirrors.digitalocean.com precise-updates/restricted i386 Packages
Hit http://mirrors.digitalocean.com precise-updates/universe i386 Packages
Hit http://mirrors.digitalocean.com precise-updates/multiverse i386 Packages
Hit http://mirrors.digitalocean.com precise-updates/main TranslationIndex
Hit http://mirrors.digitalocean.com precise-updates/multiverse TranslationIndex
Hit http://security.ubuntu.com precise-security Release
Hit http://mirrors.digitalocean.com precise-updates/restricted TranslationIndex
Hit http://mirrors.digitalocean.com precise-updates/universe TranslationIndex
Hit http://mirrors.digitalocean.com precise-backports/main Sources
Hit http://mirrors.digitalocean.com precise-backports/restricted Sources
Hit http://mirrors.digitalocean.com precise-backports/universe Sources
Hit http://mirrors.digitalocean.com precise-backports/multiverse Sources
Hit http://mirrors.digitalocean.com precise-backports/main amd64 Packages
Hit http://security.ubuntu.com precise-security/universe amd64 Packages
Hit http://security.ubuntu.com precise-security/universe i386 Packages
Hit http://security.ubuntu.com precise-security/universe TranslationIndex
Hit http://mirrors.digitalocean.com precise-backports/restricted amd64 Packages
Hit http://mirrors.digitalocean.com precise-backports/universe amd64 Packages
Hit http://mirrors.digitalocean.com precise-backports/multiverse amd64 Packages
Hit http://mirrors.digitalocean.com precise-backports/main i386 Packages
Hit http://mirrors.digitalocean.com precise-backports/restricted i386 Packages
Hit http://mirrors.digitalocean.com precise-backports/universe i386 Packages
Hit http://mirrors.digitalocean.com precise-backports/multiverse i386 Packages
Hit http://mirrors.digitalocean.com precise-backports/main TranslationIndex
Hit http://security.ubuntu.com precise-security/universe Translation-en
Hit http://mirrors.digitalocean.com precise-backports/multiverse TranslationIndex
Hit http://mirrors.digitalocean.com precise-backports/restricted TranslationIndex
Hit http://mirrors.digitalocean.com precise-backports/universe TranslationIndex
Hit http://mirrors.digitalocean.com precise-security/main Sources
Hit http://mirrors.digitalocean.com precise-security/restricted Sources
Hit http://mirrors.digitalocean.com precise-security/universe Sources
Hit http://mirrors.digitalocean.com precise-security/multiverse Sources
Hit http://software.virtualmin.com virtualmin-precise Release
Hit http://mirrors.digitalocean.com precise-security/main amd64 Packages
Hit http://mirrors.digitalocean.com precise-security/restricted amd64 Packages
Hit http://mirrors.digitalocean.com precise-security/universe amd64 Packages
Hit http://mirrors.digitalocean.com precise-security/multiverse amd64 Packages
Hit http://mirrors.digitalocean.com precise-security/main i386 Packages
Hit http://mirrors.digitalocean.com precise-security/restricted i386 Packages
Hit http://mirrors.digitalocean.com precise-security/universe i386 Packages
Hit http://mirrors.digitalocean.com precise-security/multiverse i386 Packages
Hit http://mirrors.digitalocean.com precise-security/main TranslationIndex
Hit http://mirrors.digitalocean.com precise-security/multiverse TranslationIndex
Hit http://mirrors.digitalocean.com precise-security/restricted TranslationIndex
Hit http://mirrors.digitalocean.com precise-security/universe TranslationIndex
Hit http://mirrors.digitalocean.com precise/main Translation-en
Hit http://mirrors.digitalocean.com precise/multiverse Translation-en
Hit http://mirrors.digitalocean.com precise/restricted Translation-en
Hit http://mirrors.digitalocean.com precise/universe Translation-en
Hit http://mirrors.digitalocean.com precise-updates/main Translation-en
Hit http://mirrors.digitalocean.com precise-updates/multiverse Translation-en
Hit http://mirrors.digitalocean.com precise-updates/restricted Translation-en
Hit http://mirrors.digitalocean.com precise-updates/universe Translation-en
Hit http://mirrors.digitalocean.com precise-backports/main Translation-en
Hit http://mirrors.digitalocean.com precise-backports/multiverse Translation-en
Hit http://mirrors.digitalocean.com precise-backports/restricted Translation-en
Hit http://mirrors.digitalocean.com precise-backports/universe Translation-en
Hit http://mirrors.digitalocean.com precise-security/main Translation-en
Hit http://mirrors.digitalocean.com precise-security/multiverse Translation-en
Hit http://mirrors.digitalocean.com precise-security/restricted Translation-en
Hit http://mirrors.digitalocean.com precise-security/universe Translation-en
Hit http://software.virtualmin.com virtualmin-universal Release
Hit http://us.archive.ubuntu.com precise Release.gpg
Hit http://us.archive.ubuntu.com precise-updates Release.gpg
Hit http://us.archive.ubuntu.com precise Release
Hit http://us.archive.ubuntu.com precise-updates Release
Hit http://us.archive.ubuntu.com precise/universe amd64 Packages
Hit http://us.archive.ubuntu.com precise/universe i386 Packages
Hit http://us.archive.ubuntu.com precise/universe TranslationIndex
Hit http://us.archive.ubuntu.com precise-updates/universe amd64 Packages
Hit http://us.archive.ubuntu.com precise-updates/universe i386 Packages
Hit http://us.archive.ubuntu.com precise-updates/universe TranslationIndex
Hit http://us.archive.ubuntu.com precise/universe Translation-en
Hit http://us.archive.ubuntu.com precise-updates/universe Translation-en
Hit http://software.virtualmin.com virtualmin-precise/main amd64 Packages
Hit http://software.virtualmin.com virtualmin-precise/main i386 Packages
Ign http://software.virtualmin.com virtualmin-precise/main TranslationIndex
Hit http://software.virtualmin.com virtualmin-universal/main amd64 Packages
Hit http://software.virtualmin.com virtualmin-universal/main i386 Packages
Ign http://software.virtualmin.com virtualmin-universal/main TranslationIndex
Ign http://software.virtualmin.com virtualmin-precise/main Translation-en_US
Ign http://software.virtualmin.com virtualmin-precise/main Translation-en
Ign http://software.virtualmin.com virtualmin-universal/main Translation-en_US
Ign http://software.virtualmin.com virtualmin-universal/main Translation-en
Reading package lists. Done
root@perfectall:
# sudo apt-get upgrade
Reading package lists. Done
Building dependency tree
Reading state information. Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@perfectall:
# sudo apt-get dist-upgrade
Reading package lists. Done
Building dependency tree
Reading state information. Done
Calculating upgrade. Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@perfectall:
# sudo apt-get dist-upgrade sudo apt-get install update-manager-core^C
root@perfectall:
# sudo apt-get dist-upgrade
Reading package lists. Done
Building dependency tree
Reading state information. Done
Calculating upgrade. Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@perfectall:
# sudo apt-get install update-manager-core
Reading package lists. Done
Building dependency tree
Reading state information. Done
update-manager-core is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@perfectall:
# sudo do-release-upgrade -d
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [198 B]
Get:2 Upgrade tool [1,148 kB]
Fetched 1,148 kB in 0s (0 B/s)
authenticate ‘trusty.tar.gz’ against ‘trusty.tar.gz.gpg’
extracting ‘trusty.tar.gz’
Updating repository information
Third party sources disabled
Some third party entries in your sources.list were disabled. You can
re-enable them after the upgrade with the ‘software-properties’ tool
or your package manager.
To continue please press [ENTER]
Get:1 http://security.ubuntu.com trusty-security Release.gpg [933 B]
Get:2 http://security.ubuntu.com trusty-security Release [58.5 kB]
Get:3 http://security.ubuntu.com trusty-security/universe amd64 Packages [14 B]
Get:4 http://security.ubuntu.com trusty-security/universe i386 Packages [14 B]
Get:5 http://security.ubuntu.com trusty-security/universe TranslationIndex [70 B]
Get:6 http://security.ubuntu.com trusty-security/universe Translation-en [14 B]
Get:7 http://us.archive.ubuntu.com trusty Release.gpg [933 B]
Get:8 http://us.archive.ubuntu.com trusty-updates Release.gpg [933 B]
Get:9 http://us.archive.ubuntu.com trusty Release [58.5 kB]
Get:10 http://us.archive.ubuntu.com trusty-updates Release [58.5 kB]
Get:11 http://us.archive.ubuntu.com trusty/universe amd64 Packages [5,859 kB]
Get:12 http://us.archive.ubuntu.com trusty/universe i386 Packages [5,866 kB]
Get:13 http://us.archive.ubuntu.com trusty/universe TranslationIndex [3,129 B]
Get:14 http://us.archive.ubuntu.com trusty-updates/universe amd64 Packages [1,602 B]
Get:15 http://us.archive.ubuntu.com trusty-updates/universe i386 Packages [1,601 B]
Get:16 http://us.archive.ubuntu.com trusty-updates/universe TranslationIndex [71 B]
Get:17 http://us.archive.ubuntu.com trusty/universe Translation-en [4,088 kB]
Get:18 http://us.archive.ubuntu.com trusty-updates/universe Translation-en [720 B]
Fetched 16.0 MB in 6s (1,916 kB/s)
Checking package manager
Reading package lists. Done
Building dependency tree
Reading state information. Done
Building data structures. Done
Invalid package information
After updating your package information, the essential package
‘ubuntu-minimal’ could not be located. This may be because you have
no official mirrors listed in your software sources, or because of
excessive load on the mirror you are using. See /etc/apt/sources.list
for the current list of configured software sources.
In the case of an overloaded mirror, you may want to try the upgrade
again later.
Restoring original system state
Aborting
g package lists. 4%
*** Collecting problem information
The collected information can be sent to the developers to improve the
application. This might take a few minutes.
Reading package lists. Done
Building dependency tree
Reading state information. Done
Building data structures. Done
=== Command terminated with exit status 1 (Mon Apr 21 19:02:21 2014) ===
Источник