DBTest/1.TestWrite fails: MDB_BAD_TXN: Transaction cannot recover

今天,终于把这个困扰我好久的问题解决了。心累之余,分享给大家。

主要问题是编译caffe的时候报错了:

[----------] 5 tests from DBTest/1, where TypeParam = caffe::TypeLMDB
[ RUN      ] DBTest/1.TestNext
[       OK ] DBTest/1.TestNext (167 ms)
[ RUN      ] DBTest/1.TestKeyValue
[       OK ] DBTest/1.TestKeyValue (84 ms)
[ RUN      ] DBTest/1.TestGetDB
[       OK ] DBTest/1.TestGetDB (95 ms)
[ RUN      ] DBTest/1.TestWrite
F0613 10:11:38.864806  2310 db_lmdb.hpp:15] Check failed: mdb_status == 0 (-30782 vs. 0) MDB_BAD_TXN: Transaction cannot recover - it must be aborted
*** Check failure stack trace: ***
    @     0x7f8ac6aa740d  google::LogMessage::Fail()
    @     0x7f8ac6aa92cf  google::LogMessage::SendToLog()
    @     0x7f8ac6aa6fa3  google::LogMessage::Flush()
    @     0x7f8ac6aa9bee  google::LogMessageFatal::~LogMessageFatal()
    @     0x7f8ac77e1877  caffe::db::LMDBTransaction::Commit()
    @     0x7f8ac77e1746  caffe::db::LMDBTransaction::Commit()
    @           0x9e829b  caffe::DBTest_TestWrite_Test<>::TestBody()
    @           0xd58883  testing::internal::HandleExceptionsInMethodIfSupported<>()
    @           0xd50687  testing::Test::Run()
    @           0xd5072e  testing::TestInfo::Run()
    @           0xd50835  testing::TestCase::Run()
    @           0xd52ac8  testing::internal::UnitTestImpl::RunAllTests()
    @           0xd52d57  testing::UnitTest::Run()
    @           0x8d25cf  main
    @     0x7f8ab575cb05  __libc_start_main
    @           0x8d9b39  (unknown)

哎。google了好久,都是问问题的,没有人解决这个问题。
思前想后了好久,把caffe这一段源码也看明白了。
终于灵思一动,解决了。
解决方案是重新下载新的lmdb包,然后安装就ok了。
包我放csdn下面了。大家移步去下载吧。
下载好后就是解压缩,然后make
make install
原文地址:https://www.cnblogs.com/whu-zeng/p/6141099.html