bestswifter / macbootstrap

A bootstrap script for new Mac
Apache License 2.0
774 stars 135 forks source link

自动输入 password 后结束 #10

Closed TMTBO closed 6 years ago

TMTBO commented 6 years ago
npm WARN tern_runtime No repository field.
                                          npm WARN tern_runtime No license field.

                                                                                 up to date in 0.288s
 Vim: Warning: Input is not from a terminal
                                           Password:
                                                    Password:
                                                             Password:
bestswifter commented 6 years ago

是在安装过程中报错么?

bestswifter commented 6 years ago

我看了下 install.sh 这个文件夹,里面似乎没有 npm 相关的,除了 brew install node

TMTBO commented 6 years ago
 ~ curl https://raw.githubusercontent.com/bestswifter/macbootstrap/master/bootstrap.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                                                                                                Dload  Upload   Total   Spent    Left  Speed
100   145  100   145    0     0     49      0  0:00:02  0:00:02 --:--:--    49
                                                                              xcode-select: error: command line tools are already installed, use "Software Update" to install updates
                                                        fatal: destination path '/Users/lizhi/.macbootstrap' already exists and is not an empty directory.
                             “You have installed brew”
                                                      You have installed Beyond Compare
                                                                                       You have installed iTerm2
                                                                                                                You have installed SourceTree
                You have installed chrome
                                         You have installed ctags
                                                                 You have installed gsed
                                                                                        You have installed macvim”
                                                                                                                  You have installed coreutils
                 Updating Homebrew...
                                     ==> Auto-updated Homebrew!
                                                               Updated 1 tap (homebrew/core).
                                                                                             ==> Updated Formulae
                                                                                                                 gtk+                       joplin                     librsvg

                                                 Warning: redis 4.0.6 is already installed
                                                                                          You have installed cmake
                                                                                                                  You have installed gawk
            You have installed autojump
                                       You have installed wget
                                                              You have installed node
                                                                                     You have installed exiv2
                                                                                                             You have installed ssh-copy-id
              Installing imagemagick
                                    Error: imagemagick 7.0.7-19 is already installed
                                                                                    To upgrade to 7.0.7-21, run `brew upgrade imagemagick`
             You have installed catimg
                                      You have installed gpg
                                                            You have installed icdiff
                                                                                     You have installed scmpuff
                                                                                                               fatal: destination path '/Users/lizhi/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting' already exists and is not an empty directory.
                                                                                                                        fatal: destination path '/Users/lizhi/.vim' already exists and is not an empty directory.
                                                                                    ln: /Users/lizhi/.vimrc: File exists
                                                                                                                        install.sh: line 112: cd: /Users/lizhi/.vim/bundle/: No such file or directory
                                                                         fatal: destination path 'YouCompleteMe' already exists and is not an empty directory.
                                 Searching Python 2.7 libraries...
                                                                  Found Python library: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.dylib
                                                           Found Python headers folder: /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
                                     -- The C compiler identification is AppleClang 9.0.0.9000038
                                                                                                 -- The CXX compiler identification is AppleClang 9.0.0.9000038
                                  -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
                               -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
                                     -- Detecting C compiler ABI info
                                                                     -- Detecting C compiler ABI info - done
                                                                                                            -- Detecting C compile features
              -- Detecting C compile features - done
                                                    -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
                                                    -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
                                                             -- Detecting CXX compiler ABI info
                                                                                               -- Detecting CXX compiler ABI info - done
           -- Detecting CXX compile features
                                            -- Detecting CXX compile features - done
                                                                                    -- Found PythonLibs: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.dylib (found suitable version "2.7.10", minimum required is "2.6") 
             Using Clang archive: /Users/lizhi/.macbootstrap/YouCompleteMe/third_party/ycmd/cpp/../clang_archives/clang+llvm-5.0.0-x86_64-apple-darwin.tar.xz
                                Using libclang to provide semantic completion for C/C++/ObjC
                                                                                            Using external libclang: /private/var/folders/y2/n6y5bwbn2tn282kryjtbh8ch0000gn/T/ycm_build_NeGTzi/clang+llvm-5.0.0-x86_64-apple-darwin/lib/libclang.dylib
                                                                                                                         -- Configuring done
               -- Generating done
                                 -- Build files have been written to: /private/var/folders/y2/n6y5bwbn2tn282kryjtbh8ch0000gn/T/ycm_build_NeGTzi
                  Scanning dependencies of target BoostParts
                                                            [  1%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/codecvt_error_category.cpp.o
                                               [  2%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/operations.cpp.o
                      [  5%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/path_traits.cpp.o
                                                                                                                           [  5%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/path.cpp.o
                                                                                            [  6%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/portability.cpp.o
                                                                    [  7%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/unique_path.cpp.o
                                            [  9%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/utf8_codecvt_facet.cpp.o
                           [ 10%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/windows_file_codecvt.cpp.o
            [ 11%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/converter/arg_to_python_base.cpp.o
 [ 13%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/converter/builtin_converters.cpp.o
                                                                                                                   [ 14%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/converter/from_python.cpp.o
                                                                                                 [ 15%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/converter/registry.cpp.o
                                                                            [ 17%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/converter/type_id.cpp.o
                                                      [ 18%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/dict.cpp.o
                   [ 19%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/errors.cpp.o
                                                                                                               [ 21%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/exec.cpp.o
                                                                            [ 22%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/import.cpp.o
                                           [ 23%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/list.cpp.o
        [ 25%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/long.cpp.o
                                                                                                  [ 26%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/module.cpp.o
                                                                 [ 27%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/class.cpp.o
                                      [ 28%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/enum.cpp.o
          [ 30%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/function.cpp.o
                                                                                                               [ 31%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/function_doc_signature.cpp.o
                                                                                                     [ 32%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/inheritance.cpp.o
                                                                                [ 34%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/iterator.cpp.o
                                                        [ 35%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/life_support.cpp.o
                                    [ 36%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/pickle_support.cpp.o
                  [ 38%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/stl_iterator.cpp.o
                                                                                                                           [ 39%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object_operators.cpp.o
                                                                                                    [ 40%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object_protocol.cpp.o
                                                                            [ 42%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/slice.cpp.o
                                          [ 43%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/str.cpp.o
      [ 44%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/tuple.cpp.o
                                                                                                 [ 46%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/wrapper.cpp.o
                                                                 [ 47%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/c_regex_traits.cpp.o
                                       [ 48%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/cpp_regex_traits.cpp.o
               [ 50%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/cregex.cpp.o
                                                                                                          [ 51%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/fileiter.cpp.o
                                                                          [ 52%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/icu.cpp.o
                                     [ 53%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/instances.cpp.o
      [ 55%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/posix_api.cpp.o
                                                                                                    [ 56%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex.cpp.o
                                                                 [ 57%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex_debug.cpp.o
                                    [ 59%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex_raw_buffer.cpp.o
            [ 60%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex_traits_defaults.cpp.o
                                                                                                                      [ 61%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/static_mutex.cpp.o
                                                                                          [ 63%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/usinstances.cpp.o
                                                             [ 64%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/w32_regex_traits.cpp.o
                                     [ 65%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/wc_regex_traits.cpp.o
            [ 67%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/wide_posix_api.cpp.o
                                                                                                               [ 68%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/winstances.cpp.o
                                                                                 [ 69%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/system/src/error_code.cpp.o
                                                    [ 71%] Linking CXX static library libBoostParts.a
                                                                                                     /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libBoostParts.a(windows_file_codecvt.cpp.o) has no symbols
          /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libBoostParts.a(icu.cpp.o) has no symbols
                           /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libBoostParts.a(regex_debug.cpp.o) has no symbols
                                                    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libBoostParts.a(usinstances.cpp.o) has no symbols
                                                                             /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libBoostParts.a(w32_regex_traits.cpp.o) has no symbols
                                                                                                           /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libBoostParts.a(windows_file_codecvt.cpp.o) has no symbols
                /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libBoostParts.a(icu.cpp.o) has no symbols
                                 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libBoostParts.a(regex_debug.cpp.o) has no symbols
                                                          /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libBoostParts.a(usinstances.cpp.o) has no symbols
                                                                                   /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libBoostParts.a(w32_regex_traits.cpp.o) has no symbols
                                                                                                                 [ 71%] Built target BoostParts
                  Scanning dependencies of target ycm_core
                                                          [ 72%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Candidate.cpp.o
   [ 73%] Building CXX object ycm/CMakeFiles/ycm_core.dir/CandidateRepository.cpp.o
                                                                                   [ 75%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/ClangCompleter.cpp.o
                                                [ 76%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/ClangHelpers.cpp.o
           [ 77%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/ClangUtils.cpp.o
                                                                                                 [ 78%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/CompilationDatabase.cpp.o
                                                                   [ 80%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/CompletionData.cpp.o
                                [ 81%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/Documentation.cpp.o
                                                                                                                         [ 82%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/Range.cpp.o
                                                                             [ 84%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/TranslationUnit.cpp.o
                                           [ 85%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/TranslationUnitStore.cpp.o
              [ 86%] Building CXX object ycm/CMakeFiles/ycm_core.dir/IdentifierCompleter.cpp.o
                                                                                              [ 88%] Building CXX object ycm/CMakeFiles/ycm_core.dir/IdentifierDatabase.cpp.o
                                                [ 89%] Building CXX object ycm/CMakeFiles/ycm_core.dir/IdentifierUtils.cpp.o
                                                                                                                            [ 90%] Building CXX object ycm/CMakeFiles/ycm_core.dir/LetterNode.cpp.o
                                                                      [ 92%] Building CXX object ycm/CMakeFiles/ycm_core.dir/LetterNodeListMap.cpp.o
                       [ 93%] Building CXX object ycm/CMakeFiles/ycm_core.dir/PythonSupport.cpp.o
                                                                                                 [ 94%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Result.cpp.o
                                       [ 96%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Utils.cpp.o
                                                                                                         [ 97%] Building CXX object ycm/CMakeFiles/ycm_core.dir/versioning.cpp.o
                                                   [ 98%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ycm_core.cpp.o
                                                                                                                        [100%] Linking CXX shared library /Users/lizhi/.macbootstrap/YouCompleteMe/third_party/ycmd/ycm_core.so
                                                                                                  [100%] Built target ycm_core
npm WARN tern_runtime No repository field.
                                          npm WARN tern_runtime No license field.

                                                                                 up to date in 0.302s
                                                                                                     Vim: Warning: Input is not from a terminal
                  Password:
                           Password:
                                    Password:
                                             %                                                                      ➜ ➜  ➜➜➜➜  ~ 
TMTBO commented 6 years ago

没有报错,插到这里,会输出3次password: 就结束了,这3次 password 并没有让我输入

bestswifter commented 6 years ago

首先是因为我们的 vim 配置不一样,install.sh 里面会尝试 进入 ~/.vim/bundle 并按照 YCM,因为你的目录不存在,所以后续的步骤会出问题。这里确实是我考虑不周,之后会加一次保护

看报错应该是安装 YCM 的过程中引发的,这个我无能为力

最后就是不建议在生产环境中使用这套脚本,因为极有可能会破坏你的已有配置。我也只会用全新的电脑做测试。

TMTBO commented 6 years ago

是的,我 git 和 zsh 的配置全没了

bestswifter commented 6 years ago

可以找回,zsh 的配置备份为 ~/.zshrc_backup 了,git 的配置备份为 ~/.gitconfig_backup

bestswifter commented 6 years ago

在最新的提交里面对安装 YCM 做了判断:

https://github.com/bestswifter/macbootstrap/commit/db6729865f6750812e6b30abeb9e2e574dbe2dd5

TMTBO commented 6 years ago
[ 90%] Building CXX object ycm/CMakeFiles/ycm_core.dir/LetterNode.cpp.o
[ 92%] Building CXX object ycm/CMakeFiles/ycm_core.dir/LetterNodeListMap.cpp.o
[ 93%] Building CXX object ycm/CMakeFiles/ycm_core.dir/PythonSupport.cpp.o
[ 94%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Result.cpp.o
[ 96%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Utils.cpp.o
[ 97%] Building CXX object ycm/CMakeFiles/ycm_core.dir/versioning.cpp.o
[ 98%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ycm_core.cpp.o
[100%] Linking CXX shared library /Users/lizhi/.macbootstrap/YouCompleteMe/third_party/ycmd/ycm_core.so
[100%] Built target ycm_core
npm WARN tern_runtime No repository field.
npm WARN tern_runtime No license field.

up to date in 0.529s
Vim: Warning: Input is not from a terminal
Password:
         Password:
                  Password:
                           %                                                                        ➜  ~ 

还是一样的问题

bestswifter commented 6 years ago

后续考虑换一套 vim 配置吧,现在还没研究到 vim