Palisade 开发库无法编译示例代码

如何解决Palisade 开发库无法编译示例代码

操作系统:Linux

几天以来,我一直试图从 Palisade FHE library 运行此示例代码。在成功编译库本身后,我尝试为其示例程序之一制作一个 makefile,并得到关于缺少命名空间的这个很长的错误。我是 C++ 的初学者,无法破译此错误消息。对于特别熟悉这个库的人来说,g++ 找不到 lbcrypto。我搜索了整个系统,但没有找到具有此名称的文件。我不知道命名空间位于何处,也不知道如何将它包含在我的 makefile 中。这是我运行 make 时的 makefile 和错误。

生成文件

CC = g++
 CFLAGS = -Wall -g

 main: simple-integers.o ; $(CC) $(CFLAGS) -l /usr/local/include/palisade/pke/ciphertext.h -o main simple-integers.o

simple-integers.o: simple-integers.cpp ; $(CC) $(CFLAGS) -c simple-integers.cpp -I /usr/local/include/palisade/pke/ -I /usr/local/include/palisade/core -I /usr/local/include/palisade

错误

/usr/bin/ld: /home/admin/Libraries/palisade-release/src/pke/examples/simple-integers.cpp:100: undefined reference to `lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorIlaptop% cat file.txt 
g++ -Wall -g -o main simple-integers.o 
/usr/bin/ld: simple-integers.o: warning: relocation against `_ZTVN8lbcrypto15IntegerEncodingE' in read-only section `.text._ZN8lbcrypto15IntegerEncodingC2ESt10shared_ptrINS_12ILDCRTParamsIN9bigintfxd10BigIntegerIjLj3500EEEEEES1_INS_18EncodingParamsImplEE[_ZN8lbcrypto15IntegerEncodingC5ESt10shared_ptrINS_12ILDCRTParamsIN9bigintfxd10BigIntegerIjLj3500EEEEEES1_INS_18EncodingParamsImplEE]' 
/usr/bin/ld: /usr/bin/ld: DWARF error: could not find variable specification at offset 42f44 
simple-integers.o: in function `main': 
/home/admin/Libraries/palisade-release/src/pke/examples/simple-integers.cpp:40: undefined reference to `lbcrypto::CryptoContextFactory<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,3500u> > > >::genCryptoContextBFVrns(unsigned long,lbcrypto::SecurityLevel,float,unsigned int,MODE,int,unsigned long,unsigned int)' 
/usr/bin/ld: /home/admin/Libraries/palisade-release/src/pke/examples/simple-integers.cpp:55: undefined reference to `lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,3500u> > > >::EvalMultKeyGen(std::shared_ptr<lbcrypto::LPPrivateKeyImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,3500u> > > > >)' 
/usr/bin/ld: /home/admin/Libraries/palisade-release/src/pke/examples/simple-integers.cpp:58: undefined reference to `lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,3500u> > > >::EvalAtIndexKeyGen(std::shared_ptr<lbcrypto::LPPrivateKeyImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,3500u> > > > >,std::vector<int,std::allocator<int> > const&,std::shared_ptr<lbcrypto::LPPublicKeyImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,3500u> > > > >)' 
/usr/bin/ld: /home/admin/Libraries/palisade-release/src/pke/examples/simple-integers.cpp:90: undefined reference to `lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,3500u> > > >::EvalAtIndex(std::shared_ptr<lbcrypto::CiphertextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,3500u> > > > const>,int) const' 
/usr/bin/ld: /home/admin/Libraries/palisade-release/src/pke/examples/simple-integers.cpp:91: undefined reference to `lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,int) const' 
/usr/bin/ld: /home/admin/Libraries/palisade-release/src/pke/examples/simple-integers.cpp:92: undefined reference to `lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,int) const' 
/usr/bin/ld: /home/admin/Libraries/palisade-release/src/pke/examples/simple-integers.cpp:93: undefined reference to `lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,int) const' 
/usr/bin/ld: /home/admin/Libraries/palisade-release/src/pke/examples/simple-integers.cpp:100: undefined reference to `lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,3500u> > > >::Decrypt(std::shared_ptr<lbcrypto::LPPrivateKeyImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,std::shared_ptr<lbcrypto::CiphertextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,std::shared_ptr<lbcrypto::PlaintextImpl>*)' 
/usr/bin/ld: /home/admin/Libraries/palisade-release/src/pke/examples/simple-integers.cpp:105: undefined reference to `lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,std::shared_ptr<lbcrypto::PlaintextImpl>*)' 
/usr/bin/ld: /home/admin/Libraries/palisade-release/src/pke/examples/simple-integers.cpp:109: undefined reference to `lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,std::shared_ptr<lbcrypto::PlaintextImpl>*)' 
/usr/bin/ld: /home/admin/Libraries/palisade-release/src/pke/examples/simple-integers.cpp:111: undefined reference to `lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,std::shared_ptr<lbcrypto::PlaintextImpl>*)' 
/usr/bin/ld: /home/admin/Libraries/palisade-release/src/pke/examples/simple-integers.cpp:113: undefined reference to `lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,std::shared_ptr<lbcrypto::PlaintextImpl>*)' 
/usr/bin/ld: simple-integers.o:/home/admin/Libraries/palisade-release/src/pke/examples/simple-integers.cpp:115: more undefined references to `lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,std::shared_ptr<lbcrypto::PlaintextImpl>*)' follow 
/usr/bin/ld: simple-integers.o: in function `lbcrypto::PlaintextImpl::PlaintextImpl(std::shared_ptr<lbcrypto::ILDCRTParams<bigintfxd::BigInteger<unsigned int,3500u> > >,std::shared_ptr<lbcrypto::EncodingParamsImpl>,bool)': 
/usr/local/include/palisade/core/encoding/plaintext.h:148: undefined reference to `lbcrypto::PolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,3500u> > >::PolyImpl(std::shared_ptr<lbcrypto::ILDCRTParams<bigintfxd::BigInteger<unsigned int,Format,bool)' 
/usr/bin/ld: /usr/local/include/palisade/core/encoding/plaintext.h:148: undefined reference to `lbcrypto::PolyImpl<bigintnat::NativeVector<bigintnat::NativeIntegerT<unsigned long> > >::PolyImpl()' 
/usr/bin/ld: /usr/local/include/palisade/core/encoding/plaintext.h:148: undefined reference to `lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,3500u> > >::DCRTPolyImpl(std::shared_ptr<lbcrypto::ILDCRTParams<bigintfxd::BigInteger<unsigned int,bool)' 
/usr/bin/ld: /usr/local/include/palisade/core/encoding/plaintext.h:148: undefined reference to `lbcrypto::PolyImpl<bigintnat::NativeVector<bigintnat::NativeIntegerT<unsigned long> > >::~PolyImpl()' 
/usr/bin/ld: /usr/local/include/palisade/core/encoding/plaintext.h:148: undefined reference to `lbcrypto::PolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,3500u> > >::~PolyImpl()' 
/usr/bin/ld: simple-integers.o: in function `lbcrypto::CKKSPackedEncoding::CKKSPackedEncoding(std::shared_ptr<lbcrypto::ILDCRTParams<bigintfxd::BigInteger<unsigned int,std::shared_ptr<lbcrypto::EncodingParamsImpl>)': 
/usr/local/include/palisade/core/encoding/ckkspackedencoding.h:67: undefined reference to `vtable for lbcrypto::CKKSPackedEncoding' 
/usr/bin/ld: simple-integers.o: in function `lbcrypto::CoefPackedEncoding::CoefPackedEncoding(std::shared_ptr<lbcrypto::ILDCRTParams<bigintfxd::BigInteger<unsigned int,std::shared_ptr<lbcrypto::EncodingParamsImpl>)': 
/usr/local/include/palisade/core/encoding/coefpackedencoding.h:48: undefined reference to `vtable for lbcrypto::CoefPackedEncoding' 
/usr/bin/ld: simple-integers.o: in function `lbcrypto::FractionalEncoding::FractionalEncoding(std::shared_ptr<lbcrypto::ILDCRTParams<bigintfxd::BigInteger<unsigned int,std::shared_ptr<lbcrypto::EncodingParamsImpl>)': 
/usr/local/include/palisade/core/encoding/fractionalencoding.h:67: undefined reference to `vtable for lbcrypto::FractionalEncoding' 
/usr/bin/ld: simple-integers.o: in function `lbcrypto::IntegerEncoding::IntegerEncoding(std::shared_ptr<lbcrypto::ILDCRTParams<bigintfxd::BigInteger<unsigned int,std::shared_ptr<lbcrypto::EncodingParamsImpl>)': 
/usr/local/include/palisade/core/encoding/integerencoding.h:46: undefined reference to `vtable for lbcrypto::IntegerEncoding' 
/usr/bin/ld: simple-integers.o: in function `lbcrypto::PackedEncoding::PackedEncoding(std::shared_ptr<lbcrypto::ILDCRTParams<bigintfxd::BigInteger<unsigned int,std::shared_ptr<lbcrypto::EncodingParamsImpl>)': 
/usr/bin/ld: simple-integers.o: in function `lbcrypto::ScalarEncoding::ScalarEncoding(std::shared_ptr<lbcrypto::ILDCRTParams<bigintfxd::BigInteger<unsigned int,std::shared_ptr<lbcrypto::EncodingParamsImpl>)': 
/usr/local/include/palisade/core/encoding/scalarencoding.h:46: undefined reference to `vtable for lbcrypto::ScalarEncoding' 
/usr/bin/ld: simple-integers.o: in function `lbcrypto::StringEncoding::StringEncoding(std::shared_ptr<lbcrypto::ILDCRTParams<bigintfxd::BigInteger<unsigned int,std::shared_ptr<lbcrypto::EncodingParamsImpl>)': 
/usr/bin/ld: simple-integers.o: in function `lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,3500u> > > >::KeyGen()': 
/usr/local/include/palisade/pke/cryptocontext.h:939: undefined reference to `lbcrypto::CryptoContextFactory<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,3500u> > > >::GetContextForPointer(lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,3500u> > > >*)' 
/usr/bin/ld: simple-integers.o: in function `lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,3500u> > > >::EvalMult(std::shared_ptr<lbcrypto::CiphertextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,3500u> > > > const>) const': 
/usr/local/include/palisade/pke/cryptocontext.h:2522: undefined reference to `lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,3500u> > > >::GetEvalMultKeyVector(std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char> > const&)' 
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE 
collect2: error: ld returned 1 exit status 
make: *** [Makefile:4: main] Error 1 
/usr/bin/ld: /home/admin/Libraries/palisade-release/src/pke/examples/simple-integers.cpp:100: undefined reference to `lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorIlaptop% cat file.txt 
g++ -Wall -g -o main simple-integers.o 
/usr/bin/ld: simple-integers.o: warning: relocation against `_ZTVN8lbcrypto15IntegerEncodingE' in read-only section `.text._ZN8lbcrypto15IntegerEncodingC2ESt10shared_ptrINS_12ILDCRTParamsIN9bigintfxd10BigIntegerIjLj3500EEEEEES1_INS_18EncodingParamsImplEE[_ZN8lbcrypto15IntegerEncodingC5ESt10shared_ptrINS_12ILDCRTParamsIN9bigintfxd10BigIntegerIjLj3500EEEEEES1_INS_18EncodingParamsImplEE]' 
/usr/bin/ld: /usr/bin/ld: DWARF error: could not find variable specification at offset 42f44 
simple-integers.o: in function `main': 
/home/admin/Libraries/palisade-release/src/pke/examples/simple-integers.cpp:40: undefined reference to `lbcrypto::CryptoContextFactory<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,bool)' 
/usr/bin/ld: simple-integers.o: in function `lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintfxd::BigVectorImpl<bigintfxd::BigInteger<unsigned int,std::allocator<char> > const&)' 
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE 
collect2: error: ld returned 1 exit status 
make: *** [Makefile:4: main] Error 1

我尝试编译的示例代码

// @file  simple-integers.cpp - Simple example for BFVrns (integer arithmetic).
// @author TPOC: contact@palisade-crypto.org
//
// @copyright Copyright (c) 2019,New Jersey Institute of Technology (NJIT))
// All rights reserved.
// Redistribution and use in source and binary forms,with or without
// modification,are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice,// this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice,// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution. THIS SOFTWARE IS
// PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
// IMPLIED WARRANTIES,INCLUDING,BUT NOT LIMITED TO,THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
// EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,// INDIRECT,INCIDENTAL,SPECIAL,EXEMPLARY,OR CONSEQUENTIAL DAMAGES
// (INCLUDING,PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE,DATA,OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY,WHETHER IN CONTRACT,STRICT LIABILITY,OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE,EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "palisade.h"

using namespace lbcrypto;

int main() {
  // Sample Program: Step 1: Set CryptoContext

  // Set the main parameters
  int plaintextModulus = 65537;
  double sigma = 3.2;
  SecurityLevel securityLevel = HEStd_128_classic;
  uint32_t depth = 2;

  // Instantiate the crypto context
  CryptoContext<DCRTPoly> cryptoContext =
      CryptoContextFactory<DCRTPoly>::genCryptoContextBFVrns(
          plaintextModulus,securityLevel,sigma,depth,OPTIMIZED);

  // Enable features that you wish to use
  cryptoContext->Enable(ENCRYPTION);
  cryptoContext->Enable(SHE);

  // Sample Program: Step 2: Key Generation

  // Initialize Public Key Containers
  LPKeyPair<DCRTPoly> keyPair;

  // Generate a public/private key pair
  keyPair = cryptoContext->KeyGen();

  // Generate the relinearization key
  cryptoContext->EvalMultKeyGen(keyPair.secretKey);

  // Generate the rotation evaluation keys
  cryptoContext->EvalAtIndexKeyGen(keyPair.secretKey,{1,2,-1,-2});

  // Sample Program: Step 3: Encryption

  // First plaintext vector is encoded
  std::vector<int64_t> vectorOfInts1 = {1,3,4,5,6,7,8,9,10,11,12};
  Plaintext plaintext1 = cryptoContext->MakePackedPlaintext(vectorOfInts1);
  // Second plaintext vector is encoded
  std::vector<int64_t> vectorOfInts2 = {3,1,12};
  Plaintext plaintext2 = cryptoContext->MakePackedPlaintext(vectorOfInts2);
  // Third plaintext vector is encoded
  std::vector<int64_t> vectorOfInts3 = {1,12};
  Plaintext plaintext3 = cryptoContext->MakePackedPlaintext(vectorOfInts3);

  // The encoded vectors are encrypted
  auto ciphertext1 = cryptoContext->Encrypt(keyPair.publicKey,plaintext1);
  auto ciphertext2 = cryptoContext->Encrypt(keyPair.publicKey,plaintext2);
  auto ciphertext3 = cryptoContext->Encrypt(keyPair.publicKey,plaintext3);

  // Sample Program: Step 4: Evaluation

  // Homomorphic additions
  auto ciphertextAdd12 = cryptoContext->EvalAdd(ciphertext1,ciphertext2);
  auto ciphertextAddResult =
      cryptoContext->EvalAdd(ciphertextAdd12,ciphertext3);

  // Homomorphic multiplications
  auto ciphertextMul12 = cryptoContext->EvalMult(ciphertext1,ciphertext2);
  auto ciphertextMultResult =
      cryptoContext->EvalMult(ciphertextMul12,ciphertext3);

  // Homomorphic rotations
  auto ciphertextRot1 = cryptoContext->EvalAtIndex(ciphertext1,1);
  auto ciphertextRot2 = cryptoContext->EvalAtIndex(ciphertext1,2);
  auto ciphertextRot3 = cryptoContext->EvalAtIndex(ciphertext1,-1);
  auto ciphertextRot4 = cryptoContext->EvalAtIndex(ciphertext1,-2);

  // Sample Program: Step 5: Decryption

  // Decrypt the result of additions
  Plaintext plaintextAddResult;
  cryptoContext->Decrypt(keyPair.secretKey,ciphertextAddResult,&plaintextAddResult);

  // Decrypt the result of multiplications
  Plaintext plaintextMultResult;
  cryptoContext->Decrypt(keyPair.secretKey,ciphertextMultResult,&plaintextMultResult);

  // Decrypt the result of rotations
  Plaintext plaintextRot1;
  cryptoContext->Decrypt(keyPair.secretKey,ciphertextRot1,&plaintextRot1);
  Plaintext plaintextRot2;
  cryptoContext->Decrypt(keyPair.secretKey,ciphertextRot2,&plaintextRot2);
  Plaintext plaintextRot3;
  cryptoContext->Decrypt(keyPair.secretKey,ciphertextRot3,&plaintextRot3);
  Plaintext plaintextRot4;
  cryptoContext->Decrypt(keyPair.secretKey,ciphertextRot4,&plaintextRot4);

  plaintextRot1->SetLength(vectorOfInts1.size());
  plaintextRot2->SetLength(vectorOfInts1.size());
  plaintextRot3->SetLength(vectorOfInts1.size());
  plaintextRot4->SetLength(vectorOfInts1.size());

  std::cout << "Plaintext #1: " << plaintext1 << std::endl;
  std::cout << "Plaintext #2: " << plaintext2 << std::endl;
  std::cout << "Plaintext #3: " << plaintext3 << std::endl;

  // Output results
  std::cout << "\nResults of homomorphic computations" << std::endl;
  std::cout << "#1 + #2 + #3: " << plaintextAddResult << std::endl;
  std::cout << "#1 * #2 * #3: " << plaintextMultResult << std::endl;
  std::cout << "Left rotation of #1 by 1: " << plaintextRot1 << std::endl;
  std::cout << "Left rotation of #1 by 2: " << plaintextRot2 << std::endl;
  std::cout << "Right rotation of #1 by 1: " << plaintextRot3 << std::endl;
  std::cout << "Right rotation of #1 by 2: " << plaintextRot4 << std::endl;

  return 0;
}

为简洁起见,省略了一些错误。

解决方法

我想问一个澄清问题。为什么您尝试手动编写 const { Client } = require('discord.js'); const bot = new Client(); const TOKEN = process.env.TOKEN; const PREFIX = '!'; bot.on('ready',() => { console.log('This bot is active!'); }); bot.on('message',(message) => { if (message.content === '!dm') { const taggedUser = message.mentions.users.first(); const user = client.users.cache.get(taggedUser.username); user.send('test'); } }); bot.login(TOKEN); 文件,而不是使用基于 Makefile 的 PALISADE 推荐方法?说明位于 https://gitlab.com/palisade/palisade-development/-/wikis/Instructions-for-building-user-projects-that-use-PALISADE。您应该只需复制 cmake 用户示例并进行细微更改即可编译。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-