折腾:
【已解决】升级Xcode 8.3.3后编译项目出错:Module compiled with Swift 3.0 cannot be imported in Swift 3.1
期间,希望通过升级Carthage去解决swift版本兼容问题。
Release 0.20: Unary, Binary, Ternary · Carthage/Carthage
Carthage/Carthage: A simple, decentralized dependency manager for Cocoa
去看了最新版本是0.24.0
但是没看到如何升级Carthage。
升级carthage
然后先去更新
➜ SalesAppiOS git:(master) ✗ carthage version 0.16.2 |
然后再去:
brew upgrade carthage
看到半天还是显示:
Updating Homebrew…
觉得还是很慢,所以搜了:
Updating Homebrew…
参考:
brew update 慢 解决办法 镜像更新源 | 落格博客
brew update gets stuck · Issue #895 · Homebrew/brew
【猫咪教程】#6 换源让Homebrew速度飞起!一起brew吧! | Maomi’s Blog
Is it possible to `brew install` without updating? · Issue #1670 · Homebrew/brew
不过暂时不用去管,因为已经可以继续输出了:
➜ SalesAppiOS git:(master) ✗ brew upgrade carthage Updating Homebrew… ==> Auto-updated Homebrew! Updated 1 tap (homebrew/core). ==> New Formulae akamai dcm2niix gromacs maxima r allure dcos-cli haste-client metis [email protected] ampl-mp dep hdf5 mimic [email protected] angular-cli dlib [email protected] mono-libgdiplus rustup-init antlr4-cpp-runtime docker2aci http-server moodbar s-nail apache-arrow druid hwloc mruby-cli [email protected] apache-ctakes dwarf hypre mujs scalapack apng2gif [email protected] iamy nco sccache armadillo [email protected] igraph ncview snapcraft arpack faas-cli inetutils neovim stubby asdf fd insect netcdf suite-sparse audacious flann ipython nlopt sundials bartycrouch freedink [email protected] octave superlu bash-snippets frugal jhipster openblas team-explorer-everywhere bdsup2sub fsql jose [email protected] tectonic bento4 get_iplayer jupyter openfortivpn telnet bitcoin geth kubectx overmind tokei ceres-solver [email protected] libbitcoin packetq twine-pypi cfitsio git-cinnabar libbitcoin-explorer packmol veclibfort chronograf glpk libmatio payara vips clblas gmsh libmypaint pcb voro++ clfft gmt libnice pcl vtk clinfo [email protected] libopusenc percona-server-mongodb warp cminpack gomplate libpq pilosa wpscan cockroach goose libtrng pumba wxmaxima cppad gopass libxlsxwriter pycodestyle xtensor cython gradle-completion [email protected] qhull [email protected] datamash grakn [email protected] qrupdate zork ==> Updated Formulae aalib freeling libressl qcli abcl freeradius-server librsvg qemu abcm2ps freeswitch libsass qscintilla2 ace freetds libslax qt acmetool freetype libsodium quantlib acpica frei0r libsoup rabbitmq advancecomp fs-uae libspectrum radare2 advancemame fstar libsvg-cairo rakudo-star aescrypt-packetizer fswatch libtasn1 rancher-cli afflib fuse-emulator libtensorflow rancher-compose afl-fuzz fuse-zip libtermkey rbenv afsctool fuseki libtiff rbenv-bundler-ruby-version agda fwknop libtommath rbenv-ctags algernon fwup libtorrent-rasterbar rclone alot fzf libuninameslist re2 amazon-ecs-cli galen libupnp re2c ammonite-repl gammaray libusb-compat reattach-to-user-namespace amqp-cpp gammu libuv [email protected] angband ganglia libvidstab recon-ng ansible gauge libvirt recoverjpeg ansible-cmdb gcc libvisio redex [email protected] [email protected] libwbxml redis ansifilter [email protected] libwmf redis-leveldb ansiweather [email protected] libwps redpen [email protected] gcsfuse libxkbcommon remake antigen gd libxml2 remarshal antlr gdal libzip residualvm apache-archiva gdb libzzip rethinkdb apache-brooklyn-cli gdk-pixbuf lincity-ng rex apache-flink gearman linkerd rgbds apache-geode geckodriver little-cms rhash apache-spark gedit little-cms2 riak apache-zeppelin geeqie llnode riemann apktool gegl llvm riemann-client app-engine-go-64 generate-json-schema lmdb ripgrep app-engine-java geocode-glib log4cpp rkflashtool appscale-tools geoip logrotate rkhunter apr geoipupdate logstalgia rlvm apr-util geos logstash rmlint aptly geoserver logtalk rocksdb arangodb get-flash-videos lolcat rom-tools archi-steam-farm getdns lsdvd roswell argyll-cms getmail luaver rpm aria2 gexiv2 lumo rrdtool armor gflags luvit rswift arping ghc lxc rt-audio artifactory ghi lynis rtags arx-libertatis ghostscript lz4 rtv ascii ghq lzop ruby-build aspell gifsicle m-cli rust assimp gimme macosvpn rxvt-unicode at-spi2-atk gist macvim s-search at-spi2-core git magic-wormhole s3cmd atlassian-cli git-annex make s3fs aubio git-extras makensis s6 augeas git-flow-avh makepkg saldl aurora git-fresh makeself saltstack aurora-cli git-ftp mal4s sane-backends automake git-lfs mame sassc autopano-sift-c git-town mandoc saxon awf gitbucket mapcrafter sbcl aws-elasticbeanstalk giter8 mapnik sbt aws-sdk-cpp gitfs mapserver sbtenv awscli gitg mariadb scala awslogs github-markdown-toc [email protected] [email protected] axel gitlab-ci-multi-runner masscan scalaenv azure-cli gitless mat scalariform babl gjs mcabber scamper bacula-fd gjstest media-info scipy bandcamp-dl gkrellm mediaconch scour baresip glassfish mednafen screen basex glew memcached scummvm [email protected] glib menhir scw bash-git-prompt glibmm mercurial sdcv bash-preexec global meson sdl2_image bastet glog mesos sdl2_mixer bazel gmic metabase sdl_image bear gmime metaproxy sdl_mixer bee gnatsd metricbeat sdl_sound beecrypt gnome-builder mftrace sdl_ttf berkeley-db gnome-recipes mgba securefs bibtex2html gnu-chess micro selenium-server-standalone bibtexconv gnu-typist micropython serveit binaryen gnumeric mikmod servus bind gnupg mikutter sfcgal binutils gnupg-pkcs11-scd miller sfml bit [email protected] minetest shadowsocks-libev bitlbee gnuplot mingw-w64 shairport-sync bitrise [email protected] minicom shc blackbox gnuradio minidlna shellshare blastem gnutls minimal-racket shfmt blockhash go minio sip bluepill [email protected] minio-mc sjk bmake goad minisat skinny bmon gobject-introspection miniupnpc slackcat bnd godep minizinc sleuthkit boost goenv mitmproxy smali boost-bcp gofabric8 mjpegtools smlnj boost-mpi goffice mksh snakemake boost-python golo mkvtoolnix snap-telemetry boot-clj goocanvas mldonkey snappy botan goofys mm-common snappystream brew-gem google-benchmark mmark snapraid bro google-java-format mobile-shell sngrep btfs googler mockserver snzip buildifier gor moco socat buku gource moe softhsm byacc gperftools monax solr byobu gphoto2 monetdb sonar-scanner c-ares grace mongo-c-driver sonarqube cabal-install gradle mongo-cxx-driver sops caddy grafana mongo-orchestration source-highlight cairo grails mongodb source-to-image cake [email protected] mongoose sourcekitten calc graphicsmagick monit sourcery camlp4 graphite2 mono spandsp camlp5 grc mosquitto sparkey capnp grep mp3blaster spdlog cargo-completion grib-api mpc sphinx-doc carthage ✔ groonga mpd spim [email protected] groovy mpdas sqlcipher catimg grpc mpdscribble sqldiff cc65 gsl mpg123 sqlite ✔ ccextractor gsmartcontrol mps-youtube sqlite-analyzer cclive gsoap mpv sqlmap certbot gspell mruby squid certigo gst-editing-services mscgen srtp certstrap gst-libav msgpack sshfs ceylon gst-plugins-bad msitools sshuttle cfengine gst-plugins-base mspdebug sslscan chakra gst-plugins-good mtr sslyze checkstyle gst-plugins-ugly mutt ssreflect chipmunk gst-python mvtools st chkrootkit gst-rtsp-server mycli statik chromedriver gst-validate mypy stella cimg gstreamer mysql stern citus gtk+3 mysql-cluster stgit cjdns gtk-doc mysql-connector-c stlink ckan gtk-vnc mysql-connector-c++ storm clang-format gtkmm3 mysql-sandbox streamlink clasp gtksourceview [email protected] strongswan cli53 gtksourceview3 [email protected] stunnel clib gtksourceviewmm mysqltuner subnetcalc clojurescript gucharmap n subversion closure-compiler gws nagios supersonic closure-stylesheets gwyddion nano supertux clutter gx nanopb-generator supervisor clutter-gtk gx-go nativefier suricata cmake h2 nats-streaming-server svg2pdf cmark hadoop ncmpc svg2png cmark-gfm halibut ncmpcpp svgcleaner cmocka hana ndpi svtplay-dl cnats haproxy ne swagger-codegen coccinelle harfbuzz neo4j swi-prolog cockatrice hashcat neofetch swiftformat cocoapods haskell-stack netpbm swiftgen codec2 haxe newsbeuter swiftlint coffeescript hbase nghttp2 swiftplate collectd heimdal nginx swimat collector-sidecar heroku nifi syncthing colordiff hevea nim syncthing-inotify commandbox hg-fast-export nmap syntaxerl compcert hicolor-icon-theme nnn sysbench compose2kube highlight node ✔ sysdig conan hive node-build t1utils confuse hivemind [email protected] talloc conjure-up hledger [email protected] tarantool consul homebank nodeenv tarsnap consul-backinator htmldoc nodenv tarsnap-gui consul-template http_load nomad tbb convmv httpflow noti tbox convox httrack notmuch tcl-tk coq huexpress npth tcpdump corebird hugo nsd tcpreplay corectl hydra nspr tcptraceroute couchdb hyper nss tee-clc cppcheck hyperscan ntl teensy_loader_cli creduce i2p ntopng telegraf cromwell i3status numpy teleport crosstool-ng ibex nuxeo terminal-notifier crowdin ice nzbget termius cryptol icecream ocaml terraform crystal-lang icu4c ✔ ocamlbuild terraform-docs csmith ideviceinstaller ocamlsdl terragrunt cspice idris ode tesseract ctop imagemagick offlineimap testssl cucumber-cpp [email protected] ola texinfo curl imageworsener one-ml texmath dar imake oniguruma tfenv dasht imlib2 onscripter the_silver_searcher dateutils immortal opam thefuck datomic infer open-mpi tiff2png davix influxdb open-scene-graph tig davmail [email protected] openal-soft tiger-vnc dbhash innoextract openclonk tika dbt inspircd opencoarrays tile38 dbus instead opencore-amr timedog dbxml io opencsg tinyxml2 dcd ios-sim openh264 tippecanoe dcmtk ios-webkit-debug-proxy openjpeg tldr dcraw ipbt openldap tmux ddar iperf3 openmsx tnef debianutils ipfs openrct2 todolist deis ipmitool openrtsp todoman dependency-check ipv6calc opensc tomcat depqbf ircii openshift-cli tomcat-native devil irssi openslide [email protected] dfix isync openssl ✔ [email protected] dfmt jags [email protected] tor dhall-json jansson openttd trafficserver di jasper openvdb trafshow dialog jbig2dec openvpn traildb dieharder jbig2enc opus transcrypt diff-pdf jboss-forge opusfile translate-shell diff-so-fancy jemalloc orc translate-toolkit diffoscope jenkins orientdb treefrog diffutils jenkins-lts osc tsung digdag jetty oscats ttfautohint direnv jetty-runner osm-pbf tth django-completion jfrog-cli-go osm2pgrouting ttyd djvulibre jlog osm2pgsql twarc dmd jmeter osmium-tool twoping dmenu jmxtrans osquery typescript dmtx-utils jo osrm-backend udunits dnscrypt-proxy joe owfs ufoai dnscrypt-wrapper jp2a oysttyer ufraw dnsmasq jpeg p11-kit uhd dnsviz jpeginfo pachi unbound docker jpegoptim packer uncrustify docker-cloud jruby packetbeat unibilium docker-completion jsdoc3 paket unison docker-compose json-fortran pandoc-citeproc [email protected] docker-compose-completion jsoncpp pandoc-crossref unrar docker-credential-helper jsonnet pango upscaledb docker-machine jsonschema2pojo par2 upx docker-machine-completion juise parallel urbit docker-machine-driver-vultr juju pari urh docker-machine-driver-xhyve [email protected] pass urweb doctl jvgrep passenger [email protected] docutils jython pazpar2 vagrant-completion dos2unix kafka pc6001vx vala dosbox kafkacat pcap_dnsproxy valgrind dosbox-x kapacitor pcb2gcode vamp-plugin-sdk double-conversion kerl pcre ✔ vapoursynth dovecot khal pcre2 varnish dpkg kibana pcsc-lite [email protected] dropbear kitchen-sync pdf-redact-tools vault dspdfviewer knot pdf2htmlex vdirsyncer dub knot-resolver pdf2json vert.x duck kobalt pdf2svg vice duplicity kompose pdftoedn vifm dvm kops pdftoipe vim dwdiff kotlin pdns [email protected] e2fsprogs kube-aws pdnsrec vimpc easyrpg-player kubernetes-cli pegtl vncsnapshot ebook-tools kubernetes-helm percona-server vnu ecl lablgtk [email protected] volatility efl languagetool [email protected] voldemort eg lapack percona-toolkit vowpal-wabbit eigen lastpass-cli percona-xtrabackup vte3 ejabberd latex2rtf perl w3m elasticsearch latexila perl-build wabt [email protected] launch4j pgbadger wakatime-cli elixir ldc pgcli wartremover elixirscript lean-cli pgformatter watchexec elvish leaps pgloader watchman ✔ embulk ledger pgpdump watson emscripten ledit pgplot webdis encfs lego pgrouting weboob enigma leptonica phoronix-test-suite webp epeg leveldb pianobar webpack erlang lfe pick weechat etcd lftp picoc wesnoth ettercap libaacs pike wget ✔ evince libagar pioneer whois exa libarchive pixman widelands exercism libass pjproject wimlib exiftool libatomic_ops planck wine exim libav plantuml winetricks exiv2 libbluray platformio wiredtiger expat libbpg plowshare wireguard-tools exploitdb libcdr plplot wireshark faac libcds pmd woboq_codebrowser fabio libcouchbase pngcrush wolfssl fabric libdap pngquant wpcli-completion fades libebml poco wtf fail2ban libepoxy podofo wxmac fakeroot libetpan points2grid x11vnc fbida libextractor ponscripter-sekai x264 fdroidserver libfabric ponyc x265 feedgnuplot libfreenect poppler xapian feh libftdi portmidi xctool fetch-crl libgaiagraphics postgresql xdot ffmpeg libgcrypt [email protected] xmake ffmpegthumbnailer libgeotiff [email protected] xmoto fibjs libgit2 postgrest xmount ficy libgit2-glib potrace xonsh file-formula libgosu povray xplanet filebeat libgphoto2 ppsspp xrootd fio libgweather pqiv xsane firebase-cli libgxps pre-commit xsv fish libhttpseverywhere prest yadm fits libimobiledevice presto yank fizmo libjson-rpc-cpp primesieve yara fizsh liblcf prometheus yarn flactag liblo protobuf yash flake8 libmagic protobuf-c yasm flatbuffers libmaxminddb protobuf-swift yaws flatcc libmemcached psqlodbc yaz flawfinder libmicrohttpd pulseaudio ykneomgr fleetctl libmikmod purescript ykpers flex libmpdclient pushpin yle-dl flint-checker libmspub putty you-get flow ✔ libmwaw pv youtube-dl flowgrind libnfs pwgen yubico-piv-tool fltk liboping pwntools zabbix fluent-bit libosinfo pyenv zanata-client fmt libosmium pyenv-virtualenv zbackup fobis libpano pyexiv2 zbar folly libphonenumber pygobject zebra fontconfig libplist pygobject3 zero-install fontforge libpng pygtksourceview zimg fonttools libproxy pyinvoke zookeeper fop libpst pypy zorba forego libqalculate pypy3 zsh format-udf librasterlite pyqt zsh-autosuggestions fox libraw python ✔ zsh-completions freeciv librdkafka python3 ✔ zsh-syntax-highlighting freeimage libre qbs zstd freeipmi librem qcachegrind zurl ==> Renamed Formulae gmt4 -> [email protected] osh -> etsh speedtest_cli -> speedtest-cli opencv3 -> opencv root6 -> root transfig -> fig2dev ==> Deleted Formulae dvtm [email protected] libtess2 [email protected] snescom ==> Upgrading 1 outdated package, with result: carthage 0.24.0 ==> Upgrading carthage ######################################################################## 100.0% ==> Pouring carthage-0.24.0.sierra.bottle.tar.gz ==> Caveats Bash completion has been installed to: /usr/local/etc/bash_completion.d zsh completions have been installed to: /usr/local/share/zsh/site-functions ==> Summary 🍺 /usr/local/Cellar/carthage/0.24.0: 64 files, 22.7MB |
然后再去看看升级后的版本:
➜ SalesAppiOS git:(master) ✗ carthage version 0.16.2 ➜ SalesAppiOS git:(master) ✗ which carthage /usr/local/bin/carthage |
结果竟然还是0.16.2的旧版本,而不是上面看到的最新的0.24.0的新版本。
以为是之前安装Carthage不是通过brew安装而是其他安装方式,
但是看到之前:
[记录]关于Homebrew和brew,并用brew安装Carthage
中,的确是用brew安装的:
brew install carthage
重启iTerm终端看看效果
问题依旧:
brew upgrade carthage not work
updating carthage to the latest version. · Issue #1194 · Carthage/Carthage
Carthage update command fails while trying via brew · Issue #14 · IBM/CognitiveConcierge
去看了看,发现是个软链接:
➜ SalesAppiOS git:(master) ✗ which carthage /usr/local/bin/carthage ➜ SalesAppiOS git:(master) ✗ ls /usr/local/Cellar/carthage 0.16.2 0.24.0 ➜ SalesAppiOS git:(master) ✗ ll /usr/local/bin/carthage -l ls: -l: No such file or directory lrwxr-xr-x 1 crifan admin 38B 5 14 2016 /usr/local/bin/carthage -> ../Cellar/carthage/0.16.2/bin/carthage |
那去换成新版本:
➜ SalesAppiOS git:(master) ✗ ls -lha /usr/local/bin/carthage lrwxr-xr-x 1 crifan admin 38B 5 14 2016 /usr/local/bin/carthage -> ../Cellar/carthage/0.16.2/bin/carthage ➜ SalesAppiOS git:(master) ✗ ll /usr/local/Cellar/carthage total 0 drwxr-xr-x 7 crifan admin 238B 5 14 2016 0.16.2 drwxr-xr-x 10 crifan admin 340B 8 31 14:02 0.24.0 ➜ SalesAppiOS git:(master) ✗ ll /usr/local/Cellar/carthage/0.24.0 total 64 drwxr-xr-x 3 crifan admin 102B 7 10 20:23 Frameworks -rw-r–r– 1 crifan admin 580B 8 31 14:02 INSTALL_RECEIPT.json -rw-r–r– 1 crifan admin 1.3K 7 10 20:23 LICENSE.md -rw-r–r– 1 crifan admin 20K 7 10 20:23 README.md drwxr-xr-x 3 crifan admin 102B 7 10 20:23 bin drwxr-xr-x 3 crifan admin 102B 7 10 20:23 etc drwxr-xr-x 4 crifan admin 136B 7 10 20:23 share ➜ SalesAppiOS git:(master) ✗ ll /usr/local/Cellar/carthage/0.24.0/bin total 1016 -r-xr-xr-x 1 crifan admin 507K 7 10 20:23 carthage ➜ SalesAppiOS git:(master) ✗ ll /usr/local/Cellar/carthage/0.24.0/bin/carthage -r-xr-xr-x 1 crifan admin 507K 7 10 20:23 /usr/local/Cellar/carthage/0.24.0/bin/carthage ➜ SalesAppiOS git:(master) ✗ ln -s /usr/local/Cellar/carthage/0.24.0/bin/carthage /usr/local/bin/carthage ln: /usr/local/bin/carthage: File exists ➜ SalesAppiOS git:(master) ✗ rm /usr/local/bin/carthage ➜ SalesAppiOS git:(master) ✗ ln -s /usr/local/Cellar/carthage/0.24.0/bin/carthage /usr/local/bin/carthage ➜ SalesAppiOS git:(master) ✗ which carthage /usr/local/bin/carthage ➜ SalesAppiOS git:(master) ✗ ll /usr/local/bin/carthage lrwxr-xr-x 1 crifan admin 46B 8 31 14:16 /usr/local/bin/carthage -> /usr/local/Cellar/carthage/0.24.0/bin/carthage ➜ SalesAppiOS git:(master) ✗ carthage version 0.24.0 |
然后就可以了,确保命令行,系统中的carthage是升级后的新版v0.24.0了。
【总结】
此处之前是通过brew安装的carthage:
brew install carthage |
是0.16.2的旧版本,然后接着用:
brew upgrade carthage |
去升级,虽然下载了新版本0.24.0,但是并没有把默认的(软链接)出来的carthage升级换成新版本,需要:
rm /usr/local/bin/carthage ln -s /usr/local/Cellar/carthage/0.24.0/bin/carthage /usr/local/bin/carthage |
然后再去:
carthage version
即可看到版本更新,去:
ll /usr/local/bin/carthage
可以看到是指向最新版本了:
➜ SalesAppiOS git:(master) ✗ ll /usr/local/bin/carthage lrwxr-xr-x 1 crifan admin 46B 8 31 14:16 /usr/local/bin/carthage -> /usr/local/Cellar/carthage/0.24.0/bin/carthage |
转载请注明:在路上 » 【记录】升级Carthage为最新版本0.24.0