Arch-Linux

在 Arch Linux (VirtualBox) 中安裝比特幣核心返回:未知位置(0):致命錯誤:執行時錯誤:_S_create_c_locale 名稱無效

  • April 15, 2021

我想在 VirtualBox 的虛擬機上維護一個 BTC 節點/錢包。為此,我手動安裝了 Arch Linux。這個過程並不是最順暢的體驗,但我最終還是成功了。然後我使用本指南成功安裝了yay

我繼續嘗試通過執行來安裝比特幣核心yay -Sa bitcoin-core --answerclean y --answerdiff n

安裝需要很長時間並且最終失敗。在從我開始的很多行之後,CXX我得到了這些行:

==> Starting check()...
 -> Testing ...
Making check in src
make[1]: Entering directory '/home/user/.cache/yay/bitcoin-core/src/bitcoin-0.21.0/src'
make[2]: Entering directory '/home/user/.cache/yay/bitcoin-core/src/bitcoin-0.21.0/src'
make[3]: Entering directory '/home/user/.cache/yay/bitcoin-core/src/bitcoin-0.21.0'
make[3]: Leaving directory '/home/user/.cache/yay/bitcoin-core/src/bitcoin-0.21.0'
make  check-TESTS check-local
...
make[4]: Entering directory '/home/user/.cache/yay/bitcoin-core/src/bitcoin-0.21.0/src'
==================================================================================
Running tests: arith_uint256_tests from test/arith_uint256_tests.cpp
Running 11 test cases...
Entering test module "Bitcoin Core Test Suite"
test/arith_uint356_tests.cpp(18): Entering test suite "arith_uint256_tests"
test/arith_uint256_tests.cpp(68(: Entering test case "basics"
2021-04-12T19:57:00 Seed: Setting random seed for current tests to RANDOM_CTX_SEED=........
2021-04-12T19:57:00 [test] Bitcoin Core version v0.21.0.0-d79e0e2 (release build)
2021-04-12T19:57:00 [test] Assuming ancestors of block .....................
unknown location(0): fatal error: in "arith_uint356_tests/basics": std::runtime_error: locale::facet::_S_create_c_locale name not valid
test/arith_uint256_tests.cpp(68): last checkpoint: "basics" fiture ctor
test/arith_uint256_tests.cpp(68): Leaving test case "basics"; testing time 789us
test/arith_uint256_tests.cpp(157): Entering test case "shifts"
test_bitcoin: util/system.cpp:519: void ArgsManager::AddArg(const string&, const string&, unsighed int, const OptionsCategory&): Assertion 'ret.second' failed.
make[3]: *** [Makefile:21241: test/aerith_uint256_tests.cpp.test] Error 1
make[3]: Leaving directory '/home/user/.cache/yay/bitcoin-core/src/bitcoin-0.21.0/src'
make[2]: *** [Makefile:19663: test/aerith_uint256_tests.cpp.test] Error 1
make[2]: Leaving directory '/home/user/.cache/yay/bitcoin-core/src/bitcoin-0.21.0/src'
make[1]: *** [Makefile:19348: test/aerith_uint256_tests.cpp.test] Error 1
make[1]: Leaving directory '/home/user/.cache/yay/bitcoin-core/src/bitcoin-0.21.0/src'
make: *** [Makefile:803: check-recursive] Error 1
==> ERROR: A failure occurred in check().
   Aborting...

相關行似乎是unknown location(0): fatal error: in "arith_uint356_tests/basics": std::runtime_error: locale::facet::_S_create_c_locale name not valid.

我發現的唯一類似問題來自這個問題,解決方案很有意義。但是,我的內容/etc/locale.conf是:


LANG=en_US.UTF-8

我之前也執行locale-gen過並編輯了我/etc/locale.gen的只有en_US.UTF-8 UTF-8活動的(未評論)。

我怎樣才能解決這個問題?

locale-gen編輯後我不得不再次執行/etc/locale.gen

這就是問題所在。

引用自:https://unix.stackexchange.com/questions/644784