昨天更新 EOSIO 到 1.5.0 ,然后今早启动的时候就报错了,启动命令如下
nodeos -e -p eosio --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin --plugin eosio::http_plugin -d /Users/yufei/Developer/eos/data --config-dir /Users/yufei/Developer/eos/data/config --http-server-address=0.0.0.0:8888 —-access-control-allow-origin='*' --contracts-console --http-validate-host=false --filter-on='*'
错误显示如下
info 2018-12-09T00:05:43.632 thread-0 chain_plugin.cpp:333 plugin_initialize ] initializing chain plugin warn 2018-12-09T00:05:43.632 thread-0 chain_plugin.cpp:700 plugin_initialize ] 13 N5boost10filesystem16filesystem_errorE: boost::filesystem::current_path: No such file or directory rethrow boost::filesystem::current_path: No such file or directory: {"what":"boost::filesystem::current_path: No such file or directory"} thread-0 chain_plugin.cpp:700 plugin_initialize error 2018-12-09T00:05:43.632 thread-0 main.cpp:129 main ] 13 N5boost10filesystem16filesystem_errorE: boost::filesystem::current_path: No such file or directory rethrow boost::filesystem::current_path: No such file or directory: {"what":"boost::filesystem::current_path: No such file or directory"} thread-0 chain_plugin.cpp:700 plugin_initialize
发生这个错误的原因是因为老版本的还存在,而且部分命令和插件使用的是老版本。
因此,修复方法也很简单,只要执行以下命令即可
sudo ./scripts/clean_old_install.sh
然后就可以愉快的启动了~~~
然后我们再看看这个 clean_old_install.sh
脚本文件,内容如下
if [ -d "/usr/local/include/eosio" ]; then printf "\n\tOld eosio install needs to be removed.\n\n" printf "\tDo you wish to remove this install? (requires sudo)\n" select yn in "Yes" "No"; do case $yn in [Yy]* ) if [ "$(id -u)" -ne 0 ]; then printf "\n\tThis requires sudo, please run ./scripts/clean_old_install.sh with sudo\n\n" exit -1 fi pushd /usr/local &> /dev/null pushd include &> /dev/null rm -rf appbase chainbase eosio eosio.system eosiolib fc libc++ musl &> /dev/null popd &> /dev/null pushd bin &> /dev/null rm cleos eosio-abigen eosio-applesdemo eosio-launcher eosio-s2wasm eosio-wast2wasm eosiocpp keosd nodeos &> /dev/null popd &> /dev/null libraries=(libeosio_testing libeosio_chain libfc libbinaryen libWAST libWASM libRuntime libPlatform libIR libLogging libsoftfloat libchainbase libappbase libbuiltins) pushd lib &> /dev/null for lib in ${libraries[@]}; do rm ${lib}.a ${lib}.dylib ${lib}.so &> /dev/null done popd &> /dev/null pushd etc &> /dev/null rm eosio &> /dev/null popd &> /dev/null pushd share &> /dev/null rm eosio &> /dev/null popd &> /dev/null pushd usr/share &> /dev/null rm eosio &> /dev/null popd &> /dev/null pushd var/lib &> /dev/null rm eosio &> /dev/null popd &> /dev/null pushd var/log &> /dev/null rm eosio &> /dev/null popd &> /dev/null popd &> /dev/null break;; [Nn]* ) printf "\tAborting uninstall\n\n" exit -1;; esac done fi
哈,其实就是删除 /usr/local/include/eosio
下的老文件
目前尚无回复