我想做一个go get:
go get github.com/go-sql-driver/mysql
Run Code Online (Sandbox Code Playgroud)
它失败并出现以下错误:
package github.com/go-sql-driver/mysql: cannot download, $GOPATH not set. For more details see: go help gopath
Run Code Online (Sandbox Code Playgroud)
当我这样做时go env,Go值列表如下所示:
ubuntu@ip-xxx-x-xx-x:~$ go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr/lib/go"
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread"
CGO_ENABLED="1"
Run Code Online (Sandbox Code Playgroud)
显然没有设置GOPATH,我如何设置它?
我看到许多线程提到了这个错误,但没有提供我的问题的答案,需要编辑哪个文件以提供此路径的值?
我刚刚开始使用webpack,并且很难获得多入口点样本.示例中的webpack.config.js文件包含该行
var CommonsChunkPlugin = require("../../lib/optimize/CommonsChunkPlugin");
Run Code Online (Sandbox Code Playgroud)
这个错误让我失败了
Error: Cannot find module '../../lib/optimize/CommonsChunkPlugin'
Run Code Online (Sandbox Code Playgroud)
在搜索时,我发现了使用CommonsChunkPlugin和表达式的其他示例
var commonsPlugin = new webpack.optimize.CommonsChunkPlugin("common.js");
Run Code Online (Sandbox Code Playgroud)
因错误而失败
ReferenceError: webpack is not defined
Run Code Online (Sandbox Code Playgroud)
一些更多的搜索发现了一些例子,包括
var webpack = require('webpack');
Run Code Online (Sandbox Code Playgroud)
而我的构建现在失败了
Error: Cannot find module 'webpack'
Run Code Online (Sandbox Code Playgroud)
我不知道如何继续.
我已经使用了许多不同的基于*nix的系统,看起来我使用的Bash的每种风格都有不同的算法来决定运行哪些启动脚本.出于设置环境变量和别名以及打印启动消息(例如MOTD)等任务的目的,启动脚本是否适合执行这些操作?
是什么把事情之间的差异.bashrc,.bash_profile以及.environment?我也看到其他的文件,例如.login,.bash_login和.profile; 这些是否相关?在物理登录,通过ssh远程登录以及打开新的终端窗口时,运行哪些不同?跨平台(包括Mac OS X(及其Terminal.app)和Cygwin Bash)是否存在显着差异?
我已经阅读了几个关于如何在OSX上永久设置环境变量的答案.
首先,我试过这个,如何在Linux/Unix上永久设置$ PATH?但我有一条错误信息说no such file and directory,所以我想我可以尝试 ~/.bash_profile而不是~/.profile但它没有用.
其次,我找到了这个解决方案如何设置os x中应用程序使用的$ PATH,它建议进行更改
〜/ .MacOSX/environment.plist
但我又no such file and directory错了.
我需要一种方法来设置这些变量,这样每次打开一个新的终端会话时都不需要反复设置它们.
我想和Jupyter笔记本一起工作,但是在进行基本导入时遇到了困难(例如导入matplotlib).我想这是因为我有几个用户管理的python安装.例如:
> which -a python
/usr/bin/python
/usr/local/bin/python
> which -a ipython
/Library/Frameworks/Python.framework/Versions/3.5/bin/ipython
/usr/local/bin/ipython
> which -a jupyter
/Library/Frameworks/Python.framework/Versions/3.5/bin/jupyter
/usr/local/bin/jupyter
Run Code Online (Sandbox Code Playgroud)
我曾经有过anaconda,但是从〜/ anaconda目录中删除了.现在,当我启动一个Jupyter笔记本时,我得到一个内核错误:
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/pytho?n3.5/subprocess.py",
line 947, in init restore_signals, start_new_session)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/pytho?n3.5/subprocess.py",
line 1551, in _execute_child raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2]
No such file or directory: '/Users/npr1/anaconda/envs/py27/bin/python'
Run Code Online (Sandbox Code Playgroud)
我该怎么办?!
我对运行which nvcc和显示的不同CUDA版本感到非常困惑nvidia-smi.
我的ubuntu 16.04上安装了cuda9.2和cuda10.现在我将PATH设置为指向cuda9.2.所以当我跑:
$ which nvcc
/usr/local/cuda-9.2/bin/nvcc
Run Code Online (Sandbox Code Playgroud)
但是,当我跑
$ nvidia-smi
Wed Nov 21 19:41:32 2018
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.72 Driver Version: 410.72 CUDA Version: 10.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 106... Off | 00000000:01:00.0 Off | N/A |
| N/A 53C P0 26W / N/A | 379MiB / 6078MiB | 2% …Run Code Online (Sandbox Code Playgroud) 在尝试运行以下命令时,在Mac上的终端中安装Heroku Toolbelt后:
heroku
Run Code Online (Sandbox Code Playgroud)
我收到错误:
bash: heroku: command not found
Run Code Online (Sandbox Code Playgroud)
当我做:
gem environment
Run Code Online (Sandbox Code Playgroud)
我明白了:
- RUBYGEMS VERSION: 1.3.6
- RUBY VERSION: 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin11.0]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- universal-darwin-11
- GEM PATHS:
- /Library/Ruby/Gems/1.8
- /Users/Bart/.gem/ruby/1.8
- /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- …Run Code Online (Sandbox Code Playgroud) 我正在SDKLinux Ubuntu 16.4系统上配置flutter 。运行扑医生时为什么出现以下错误?我已经指定了PATHS为flutter和dart在.bashrc但是当我跑我得到这个错误flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[?] Flutter (Channel beta, v0.5.1, on Linux, locale en_US.UTF-8)
[?] Android toolchain - develop for Android devices (Android SDK 28.0.2)
[?] Android Studio (version 3.1)
? Flutter plugin not installed; this adds Flutter specific functionality.
? Dart plugin not installed; this adds Dart specific functionality.
[?] IntelliJ IDEA Community Edition (version 2018.2)
[!] …Run Code Online (Sandbox Code Playgroud) 我试图在32位CentOS 6 VPS上从源代码制作Sphinx.
当我运行此命令时:
./configure --prefix=/usr/local/sphinx
Run Code Online (Sandbox Code Playgroud)
我收到此错误输出:
checking build environment
--------------------------
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for compiler programs
------------------------------
checking whether to compile debug version... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: …Run Code Online (Sandbox Code Playgroud) 任何人都可以帮我写一个简单的shell脚本(比如script.sh),这样我就可以在执行时传递一个URL作为参数.我希望浏览器从该URL上打开的页面开始.
我想在脚本中编写命令来打开浏览器并打开参数中给出的URL.
可能听起来很简单.但过去2个小时我一直在尝试这个.