这一直困扰着我一段时间.我正在尝试编译一个巨大的C++文件(我知道它可以工作,因为它在我工作的Arch Linux计算机上工作正常).当我在我的Mac上检查我的GCC版本它返回以下内容
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.1.0
Thread model: posix
Run Code Online (Sandbox Code Playgroud)
我还使用Homebrew安装了最新的GCC版本
brew install gcc49
Run Code Online (Sandbox Code Playgroud)
我现在的问题是如何将新安装的GCC版本应用为终端使用的默认版本?
我也知道当你使用自制软件isntall gcc时,它将它命名为gcc-49,这样包之间就不会混淆了.
我不知道如何用我安装的4.9版本替换XCode附带的4.2.1版本.
谢谢
编辑:切换到我的mac以获取gcc --version的完整返回语句
编辑2:我的最终游戏是能够导航到目录并能够输入
make
sudo make install
Run Code Online (Sandbox Code Playgroud)
安装已制作的守护进程.现在,随机包和标准库返回大量错误
我正在尝试在我的虚拟环境中安装一些东西,它使用anaconda python 3.6.我得到了the gcc failed with exit status 1,暗示缺少正确的python3-devel包,如错误所述:命令'gcc'在安装eventlet时失败,退出状态为1.
为了解决这个错误,我尝试在运行RHEL 7.3的服务器上安装python3-devel软件包.我做了yum install python3-devel,但得到了一个'package not found'错误.然后我找到https://serverfault.com/questions/710354/repository-for-python3-devel-on-centos-7,它提示EPEL存储库中的python34-devel包.我使用yum安装它,但在尝试在我的虚拟环境中安装某些东西时,我仍然会收到the gcc failed with exit status 1错误.
有人知道如何解决这个问题吗?所有的帮助都会很有用.
我正在 heroku 上部署一个网站,但我遇到了一些问题。我的项目名为mysite-project.
我做了以下事情:
1)创建一个Procfile包含:
web: gunicorn mysite-project.wsgi
在我的项目的基本根目录(与 manage.py 相同的级别)。
2)应用程序/settings.py
import django_heroku 在顶部
django_heroku.settings(locals()) 在 settings.py 的底部
3)
pip install gunicorn
pip install django-heroku
pip freeze > requirements.txt
Run Code Online (Sandbox Code Playgroud)
4)如果我跑python manage.py runserver我得到:
ModuleNotFoundError: No module named 'django_heroku'
Run Code Online (Sandbox Code Playgroud) 我在让 python3 在 jenkins 中工作时遇到问题。Jenkins 目前正在 docker 容器中运行,我正在使用pipeline脚本来促进 CI/CD
这是我的Jenkinsfilepython 仓库
pipeline {
agent any
tools {
nodejs 'nodejs'
python3 'python3'
}
environment{
}
stages {
stage('build'){
steps{
echo 'Preparing'
sh 'python3 --version'
sh 'pip3 install -U pytest'
script{
// pull git tag and add to a variable to set the build info - {tag#build_no}
GIT_TAG = sh(script: "git describe --abbrev=0 --tags", returnStdout: true).trim()
sh 'echo ${GIT_TAG}'
currentBuild.displayName = "${GIT_TAG}#${BUILD_NUMBER}"
}
}
}
stage('Checkout'){
steps { …Run Code Online (Sandbox Code Playgroud) 首先,我正在使用 Python 3.7 处理 Amazon EC2 实例,Amazon linux 版本 2 AMI。
我正在尝试使用以下命令安装 python-Levenshtein 包:
pip3 install python-Levenshtein --user
Run Code Online (Sandbox Code Playgroud)
我得到了一个相当大的错误,关键部分是;
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.7m -c Levenshtein/_levenshtein.c -o build/temp.linux-x86_64-3.7/Levenshtein/_levenshtein.o
Levenshtein/_levenshtein.c:99:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)
和:
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-m87wdfsg/python-Levenshtein/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install …Run Code Online (Sandbox Code Playgroud) I'm trying to install odoo on a fresh installation of Linux on a VirtualBox machine. I have entered in the commands found here as is: Odoo Development Read the Docs. The following command is what prompts the error: command 'x86_64-linux-gnu-gcc' failed with exit status 1:
sudo pip install -r requirements.txt
Run Code Online (Sandbox Code Playgroud)
So now I'm trying to solve the problem. I have gone to error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1,error: command 'gcc' …