我想用gulp编译时遇到错误
events js: 136
我通过恢复可以工作的node_module文件夹尝试了几种修改
我找不到解决方案。你可以帮帮我吗?
(function() {
var childProcess = require("child_process");
var oldSpawn = childProcess.spawn;
function mySpawn() {
console.log('spawn called');
console.log(arguments);
var result = oldSpawn.apply(this, arguments);
return result;
}
childProcess.spawn = mySpawn;
})();
edit : after typing the command sudo gem install -n /usr/local/bin compass here is what is displayed
package configuration for libffi is not found
"xcrun clang -o conftest -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin16 -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.$
In file included from conftest.c:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby.h:33:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found
#include "ruby/config.h"
^~~~~~~~~~~~~~~
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
throw er; // Unhandled "error" event
^
Error: spawn /usr/local/bin/compass ENOENT
at _errnoException (util.js:1031:13)
at Process.ChildProcess._handle.onexit
(internal/child_process.js:201:19)
at onErrorNT (internal/child_process.js:389:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
I've been trying to chart the course :
这是日志文件的内容!!! `找不到libffi的软件包配置 “ xcrun clang -o conftest -I / Library / Developer / CommandLineTools / SDKs / MacOSX.sdk / System / Library / Frameworks / Ruby.framework / Versions / 2.3 / usr / include / ruby-2.3.0 / universal-darwin16 -I /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/backward -I / Library / Developer / CommandLineTools / SDKs /MacOSX.sdk/System/Library/Framework/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0 -I。-D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -g -Os -pipe -DHAVE_GIL_STIN- usr / local / libressl / include conftest.c -L。-L / System / Library / Frameworks / Ruby.framework / Versions / 2.3 / usr / lib -L。-L /Applications/Xcode.app/Contents/Developer/Platforms /MacOSX.platform/Developer/SDKs/MacOSX10.12.Internal.sdk/usr/local/libressl/lib -L / Applications / Xcode.app / Contents / Developer / Platforms / MacOSX.platform / Developer / SDKs / MacOSX10.12 .internal.sdk / usr / local / lib -arch x86_64 -arch i386 -lruby.2.3.0 -lpthre ad -ldl -lobjc“ 在conftest.c:1包含的文件中: 在/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby.h:33中包含的文件中: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:24:10:致命错误:找不到“ ruby / config.h”文件
^ ~~~~~~~~~~~~~~~ 产生1个错误。 检查的程序是: /* 开始 */ 1:#include“ ruby.h” 2: 3:int main(int argc,char ** argv) 4:{ 5:返回0; 6:}` /* 结束 */ 我将检查指南针文档,看它是否来自那里! 预先感谢您的帮助。 所以我尝试使用以下命令安装指南针:
gem更新--system 这是答案:
Updating rubygems-update Fetching: rubygems-update-2.7.8.gem (100%) ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
我仍然尝试其他命令看看! 代码:
宝石安装指南针:Fetching: ffi-1.9.25.gem (100%) ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
所以我在这里尝试了几件事:
xcode-select-安装 xcode-select:错误:命令行工具已经安装,请使用“软件更新”来安装更新
xcode-select -v xcode-select版本2347。
gem environment RubyGems Environment: - RUBYGEMS VERSION: 2.7.8 - RUBY VERSION: 2.3.7 (2018-03-28 patchlevel 456) [universal.x86_64-darwin16] - INSTALLATION DIRECTORY: /Library/Ruby/Gems/2.3.0 - USER INSTALLATION DIRECTORY: /Users/toto/.gem/ruby/2.3.0 - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby - EXECUTABLE DIRECTORY: /usr/bin - SPEC CACHE DIRECTORY: /Users/toto/.gem/specs - SYSTEM CONFIGURATION DIRECTORY: /Library/Ruby/Site - RUBYGEMS PLATFORMS: - ruby - universal-darwin-16 - GEM PATHS: - /Library/Ruby/Gems/2.3.0 - /Users/toto/.gem/ruby/2.3.0 - /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/gems/2.3.0 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - https://rubygems.org/ - SHELL PATH: - /Users/cminotti/.npm-global/bin - /usr/local/bin - /usr/bin - /bin - /usr/sbin - /sbin
我试过brew install ruby:
Warning: Bottle installation failed: building from source. ==> Downloading https://www.openssl.org/source/openssl-1.0.2p.tar.gz Already downloaded: /Users/cminotti/Library/Caches/Homebrew/downloads/6d2f0aa30538560efe2aae756229a9ced40e636a70083696fb1bceb6c1a7564c--openssl-1.0.2p.tar.gz /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:49:in
写':管道损坏(Errno :: EPIPE) 来自/usr/local/Homebrew/Library/Homebrew/utils/fork.rb:49:在puts' from /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:49:in
中以安全块的块(3个级别)营救” 来自/usr/local/Homebrew/Library/Homebrew/utils/fork.rb:31:inblock (3 levels) in safe_fork' from /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:30:in
fork' 来自/usr/local/Homebrew/Library/Homebrew/utils/fork.rb:30:inblock (2 levels) in safe_fork' from /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:27:in
open' 来自/usr/local/Homebrew/Library/Homebrew/utils/fork.rb:27:在block in safe_fork' from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/tmpdir.rb:89:in
mktmpdir'中 来自/usr/local/Homebrew/Library/Homebrew/utils/fork.rb:26:insafe_fork' from /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:719:in
build' 来自/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:311:ininstall' from /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:572:in
install_dependency' 来自/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:534:在block in install_dependencies' from /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:534:in
中 从/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:534:在install_dependencies' from /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:251:in
中安装' 来自/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:321:ininstall_formula' from /usr/local/Homebrew/Library/Homebrew/cmd/install.rb:253:in
在安装中阻止' 来自/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:251:ineach' from /usr/local/Homebrew/Library/Homebrew/cmd/install.rb:251:in
install' 来自/usr/local/Homebrew/Library/Homebrew/brew.rb:89:in<main>' Error: An exception occured within a build process: Errno::EACCES: Permission denied @ dir_s_mkdir - /usr/local/Cellar/openssl/1.0.2p
我继续研究,这就是我所做的: 酿造更新:
touch: /usr/local/Homebrew/.git/FETCH_HEAD: Permission denied error: cannot open .git/FETCH_HEAD: Permission denied /usr/local/Homebrew/Library/Homebrew/cmd/update.sh: line 527: /usr/local/Homebrew/.git/UPDATE_FAILED: Permission denied touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/.git/FETCH_HEAD: Permission denied error: cannot open .git/FETCH_HEAD: Permission denied /usr/local/Homebrew/Library/Homebrew/cmd/update.sh: line 527: /usr/local/Homebrew/.git/UPDATE_FAILED: Permission denied touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-php/.git/FETCH_HEAD: Permission denied error: cannot open .git/FETCH_HEAD: Permission denied /usr/local/Homebrew/Library/Homebrew/cmd/update.sh: line 527: /usr/local/Homebrew/.git/UPDATE_FAILED: Permission denied fatal: Unable to create '/usr/local/Homebrew/.git/index.lock': Permission denied fatal: Unable to create '/usr/local/Homebrew/.git/index.lock': Permission denied Cannot save the current index state Error: Could not 'git stash' in /usr/local/Homebrew! Please stash/commit manually if you need to keep your changes or, if not, run: cd /usr/local/Homebrew git reset --hard origin/master cd /usr/local/Homebrew git reset --hard origin/master fatal: Unable to create '/usr/local/Homebrew/.git/index.lock': Permission denied
无论如何,如果有人有主意,我就会有点困惑,我是接受者!
答案 0 :(得分:0)
指南针是否安装在该路径上?请尝试一下。
ALTER TABLE SOME_TABLE DROP PARTITION(year>=0,month>0) PURGE;