Debian 8 上的 Python numba / llvmlite - 我无法构建 llvmlite

2024-01-19

我尝试在 Debian 8 系统上安装 numba,如下所述:http://llvmlite.pydata.org/en/latest/install/index.html http://llvmlite.pydata.org/en/latest/install/index.html(第 2.2.3 节)。

我已经安装了 LLVM 3.5 并且似乎找到了它,但是在使用 setup.py 构建 llvmlite 时我不断收到错误:

# python setup.py build

这是完整的输出:

running build
got version from VCS {'version': '0.9.0.dev+7.gf5a7007.dirty', 'full': 'f5a70072ce0e7f5e432d6645056a60b00f957c66.dirty'}
running build_ext
/usr/bin/python ffi/build.py
LLVM version... 3.5.0
# static-libstdc++ avoids runtime dependencies on a
# particular libstdc++ version.
g++ -static-libstdc++ -shared -flto `llvm-config-3.5 --cxxflags` -fno-rtti -g assembly.cpp bitcode.cpp core.cpp initfini.cpp module.cpp value.cpp executionengine.cpp transforms.cpp passmanagers.cpp targets.cpp dylib.cpp linker.cpp -o libllvmlite.so -flto `llvm-config-3.5 --ldflags` -Wl,--exclude-libs=ALL `llvm-config-3.5 --system-libs --libs all`
assembly.cpp: In function ‘LLVMOpaqueModule* LLVMPY_ParseAssembly(LLVMContextRef, const char*, const char**)’:
assembly.cpp:25:64: error: ‘parseAssemblyString’ was not declared in this scope
     Module *m = parseAssemblyString(ir, error, *unwrap(context)).release();
                                                                ^
bitcode.cpp: In function ‘void LLVMPY_WriteBitcodeToString(LLVMModuleRef, const char**, size_t*)’:
bitcode.cpp:13:62: error: ‘LLVMWriteBitcodeToMemoryBuffer’ was not declared in this scope
     LLVMMemoryBufferRef MB = LLVMWriteBitcodeToMemoryBuffer(M);
                                                              ^
core.cpp: In function ‘void LLVMPY_SetCommandLine(const char*, const char*)’:
core.cpp:36:46: error: ‘LLVMParseCommandLineOptions’ was not declared in this scope
     LLVMParseCommandLineOptions(2, argv, NULL);
                                              ^
module.cpp: In function ‘LLVMOpaqueModule* LLVMPY_CloneModule(LLVMModuleRef)’:
module.cpp:223:29: error: ‘LLVMCloneModule’ was not declared in this scope
     return LLVMCloneModule(M);
                             ^
executionengine.cpp: In function ‘LLVMOpaqueExecutionEngine* create_execution_engine(LLVMModuleRef, LLVMTargetMachineRef, char**)’:
executionengine.cpp:72:74: error: no matching function for call to ‘llvm::EngineBuilder::EngineBuilder(std::unique_ptr<llvm::Module>)’
     llvm::EngineBuilder eb(std::unique_ptr<llvm::Module>(llvm::unwrap(M)));
                                                                          ^
executionengine.cpp:72:74: note: candidates are:
In file included from executionengine.cpp:6:0:
/usr/lib/llvm-3.5/include/llvm/ExecutionEngine/ExecutionEngine.h:594:3: note: llvm::EngineBuilder::EngineBuilder(llvm::Module*)
   EngineBuilder(Module *m) : M(m) {
   ^
/usr/lib/llvm-3.5/include/llvm/ExecutionEngine/ExecutionEngine.h:594:3: note:   no known conversion for argument 1 from ‘std::unique_ptr<llvm::Module>’ to ‘llvm::Module*’
/usr/lib/llvm-3.5/include/llvm/ExecutionEngine/ExecutionEngine.h:570:7: note: llvm::EngineBuilder::EngineBuilder(const llvm::EngineBuilder&)
 class EngineBuilder {
       ^
/usr/lib/llvm-3.5/include/llvm/ExecutionEngine/ExecutionEngine.h:570:7: note:   no known conversion for argument 1 from ‘std::unique_ptr<llvm::Module>’ to ‘const llvm::EngineBuilder&’
/usr/lib/llvm-3.5/include/llvm/ExecutionEngine/ExecutionEngine.h:570:7: note: llvm::EngineBuilder::EngineBuilder(llvm::EngineBuilder&&)
/usr/lib/llvm-3.5/include/llvm/ExecutionEngine/ExecutionEngine.h:570:7: note:   no known conversion for argument 1 from ‘std::unique_ptr<llvm::Module>’ to ‘llvm::EngineBuilder&&’
executionengine.cpp: In function ‘uint64_t LLVMPY_GetGlobalValueAddress(LLVMExecutionEngineRef, const char*)’:
executionengine.cpp:107:46: error: ‘LLVMGetGlobalValueAddress’ was not declared in this scope
     return LLVMGetGlobalValueAddress(EE, Name);
                                              ^
executionengine.cpp: In function ‘uint64_t LLVMPY_GetFunctionAddress(LLVMExecutionEngineRef, const char*)’:
executionengine.cpp:114:43: error: ‘LLVMGetFunctionAddress’ was not declared in this scope
     return LLVMGetFunctionAddress(EE, Name);
                                           ^
executionengine.cpp: At global scope:
executionengine.cpp:187:45: error: ‘llvm::MemoryBufferRef’ has not been declared
                                       llvm::MemoryBufferRef MBR)
                                             ^
executionengine.cpp:200:49: error: conflicting return type specified for ‘virtual std::unique_ptr<llvm::MemoryBuffer> LLVMPYObjectCache::getObject(const llvm::Module*)’
     virtual std::unique_ptr<llvm::MemoryBuffer> getObject(const llvm::Module* M)
                                                 ^
In file included from executionengine.cpp:8:0:
/usr/lib/llvm-3.5/include/llvm/ExecutionEngine/ObjectCache.h:36:25: error:   overriding ‘virtual llvm::MemoryBuffer* llvm::ObjectCache::getObject(const llvm::Module*)’
   virtual MemoryBuffer* getObject(const Module* M) = 0;
                         ^
/usr/lib/llvm-3.5/include/llvm/ExecutionEngine/ObjectCache.h:30:16: warning: ‘virtual void llvm::ObjectCache::notifyObjectCompiled(const llvm::Module*, const llvm::MemoryBuffer*)’ was hidden [-Woverloaded-virtual]
   virtual void notifyObjectCompiled(const Module *M, const MemoryBuffer *Obj) = 0;
                ^
executionengine.cpp:186:18: warning:   by ‘virtual void LLVMPYObjectCache::notifyObjectCompiled(const llvm::Module*, int)’ [-Woverloaded-virtual]
     virtual void notifyObjectCompiled(const llvm::Module *M,
                  ^
executionengine.cpp: In member function ‘virtual void LLVMPYObjectCache::notifyObjectCompiled(const llvm::Module*, int)’:
executionengine.cpp:191:42: error: request for member ‘getBufferStart’ in ‘MBR’, which is of non-class type ‘int’
                                      MBR.getBufferStart(),
                                          ^
executionengine.cpp:192:42: error: request for member ‘getBufferSize’ in ‘MBR’, which is of non-class type ‘int’
                                      MBR.getBufferSize() };
                                          ^
executionengine.cpp: In member function ‘virtual std::unique_ptr<llvm::MemoryBuffer> LLVMPYObjectCache::getObject(const llvm::Module*)’:
executionengine.cpp:211:21: error: no match for ‘operator=’ (operand types are ‘std::unique_ptr<llvm::MemoryBuffer>’ and ‘llvm::MemoryBuffer*’)
                 res = llvm::MemoryBuffer::getMemBufferCopy(
                     ^
executionengine.cpp:211:21: note: candidates are:
In file included from /usr/include/c++/4.9/memory:81:0,
                 from /usr/lib/llvm-3.5/include/llvm/ADT/SmallVector.h:28,
                 from /usr/lib/llvm-3.5/include/llvm/IR/DataLayout.h:24,
                 from /usr/lib/llvm-3.5/include/llvm/IR/Module.h:20,
                 from executionengine.cpp:5:
/usr/include/c++/4.9/bits/unique_ptr.h:249:7: note: std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Tp, _Dp>&&) [with _Tp = llvm::MemoryBuffer; _Dp = std::default_delete<llvm::MemoryBuffer>]
       operator=(unique_ptr&& __u) noexcept
       ^
/usr/include/c++/4.9/bits/unique_ptr.h:249:7: note:   no known conversion for argument 1 from ‘llvm::MemoryBuffer*’ to ‘std::unique_ptr<llvm::MemoryBuffer>&&’
/usr/include/c++/4.9/bits/unique_ptr.h:269:2: note: template<class _Up, class _Ep> typename std::enable_if<std::__and_<std::is_convertible<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::unique_ptr<_Tp, _Dp>::_Pointer::type>, std::__not_<std::is_array<_Up> > >::value, std::unique_ptr<_Tp, _Dp>&>::type std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Up = _Up; _Ep = _Ep; _Tp = llvm::MemoryBuffer; _Dp = std::default_delete<llvm::MemoryBuffer>]
  operator=(unique_ptr<_Up, _Ep>&& __u) noexcept
  ^
/usr/include/c++/4.9/bits/unique_ptr.h:269:2: note:   template argument deduction/substitution failed:
executionengine.cpp:211:21: note:   mismatched types ‘std::unique_ptr<_Tp, _Dp>’ and ‘llvm::MemoryBuffer*’
                 res = llvm::MemoryBuffer::getMemBufferCopy(
                     ^
In file included from /usr/include/c++/4.9/memory:81:0,
                 from /usr/lib/llvm-3.5/include/llvm/ADT/SmallVector.h:28,
                 from /usr/lib/llvm-3.5/include/llvm/IR/DataLayout.h:24,
                 from /usr/lib/llvm-3.5/include/llvm/IR/Module.h:20,
                 from executionengine.cpp:5:
/usr/include/c++/4.9/bits/unique_ptr.h:278:7: note: std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::nullptr_t) [with _Tp = llvm::MemoryBuffer; _Dp = std::default_delete<llvm::MemoryBuffer>; std::nullptr_t = std::nullptr_t]
       operator=(nullptr_t) noexcept
       ^
/usr/include/c++/4.9/bits/unique_ptr.h:278:7: note:   no known conversion for argument 1 from ‘llvm::MemoryBuffer*’ to ‘std::nullptr_t’
executionengine.cpp: In function ‘LLVMPYObjectCache* LLVMPY_CreateObjectCache(ObjectCacheNotifyFunc, ObjectCacheGetObjectFunc, void*)’:
executionengine.cpp:233:72: error: invalid new-expression of abstract class type ‘LLVMPYObjectCache’
     return new LLVMPYObjectCache(notify_func, getobject_func, user_data);
                                                                        ^
executionengine.cpp:176:7: note:   because the following virtual functions are pure within ‘LLVMPYObjectCache’:
 class LLVMPYObjectCache : public llvm::ObjectCache {
       ^
In file included from executionengine.cpp:8:0:
/usr/lib/llvm-3.5/include/llvm/ExecutionEngine/ObjectCache.h:30:16: note:   virtual void llvm::ObjectCache::notifyObjectCompiled(const llvm::Module*, const llvm::MemoryBuffer*)
   virtual void notifyObjectCompiled(const Module *M, const MemoryBuffer *Obj) = 0;
                ^
linker.cpp: In function ‘int LLVMPY_LinkModules(LLVMModuleRef, LLVMModuleRef, int, const char**)’:
linker.cpp:19:32: error: ‘DiagnosticInfo’ does not name a type
     auto diagnose = [&] (const DiagnosticInfo &DI) {
                                ^
linker.cpp:30:6: error: expected ‘)’ before ‘;’ token
     };
      ^
linker.cpp: In lambda function:
linker.cpp:30:6: error: expected ‘{’ before ‘;’ token
linker.cpp: In function ‘int LLVMPY_LinkModules(LLVMModuleRef, LLVMModuleRef, int, const char**)’:
linker.cpp:32:34: error: ‘LLVMCloneModule’ was not declared in this scope
         Src = LLVMCloneModule(Src);
                                  ^
linker.cpp:33:74: error: no matching function for call to ‘llvm::Linker::LinkModules(llvm::Module*, llvm::Module*, LLVMPY_LinkModules(LLVMModuleRef, LLVMModuleRef, int, const char**)::<lambda(int)>&)’
     bool failed = Linker::LinkModules(unwrap(Dest), unwrap(Src), diagnose);
                                                                          ^
linker.cpp:33:74: note: candidate is:
In file included from linker.cpp:4:0:
/usr/lib/llvm-3.5/include/llvm/Linker/Linker.h:51:17: note: static bool llvm::Linker::LinkModules(llvm::Module*, llvm::Module*, unsigned int, std::string*)
     static bool LinkModules(Module *Dest, Module *Src, unsigned Mode,
                 ^
/usr/lib/llvm-3.5/include/llvm/Linker/Linker.h:51:17: note:   candidate expects 4 arguments, 3 provided
Makefile.linux:17: recipe for target 'libllvmlite.so' failed
make: *** [libllvmlite.so] Error 1
Traceback (most recent call last):
  File "ffi/build.py", line 114, in <module>
    main()
  File "ffi/build.py", line 104, in main
    main_posix('linux', '.so')
  File "ffi/build.py", line 96, in main_posix
    subprocess.check_call(['make', '-f', makefile])
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-f', 'Makefile.linux']' returned non-zero exit status 2
error: command '/usr/bin/python' failed with exit status 1

有人能帮我弄清楚我错过了什么吗?

[UPDATE]

我通过使用 llvm 3.6 安装包“llmv-3.6-dev”并将“ffi/Makefile.linux”中的“LLVM_CONFIG”变量更改为“llvm-config-3.6”来修复此问题。

但现在我收到以下错误:

running build
got version from VCS {'version': '0.9.0.dev+7.gf5a7007.dirty', 'full': 'f5a70072ce0e7f5e432d6645056a60b00f957c66.dirty'}
running build_ext
/usr/bin/python ffi/build.py
LLVM version... 3.6.2
# static-libstdc++ avoids runtime dependencies on a
# particular libstdc++ version.
g++ -static-libstdc++ -shared -flto `llvm-config-3.6 --cxxflags` -fno-rtti -g assembly.cpp bitcode.cpp core.cpp initfini.cpp module.cpp value.cpp executionengine.cpp transforms.cpp passmanagers.cpp targets.cpp dylib.cpp linker.cpp -o libllvmlite.so -flto `llvm-config-3.6 --ldflags` -Wl,--exclude-libs=ALL `llvm-config-3.6 --system-libs --libs all`
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
Makefile.linux:17: recipe for target 'libllvmlite.so' failed
make: *** [libllvmlite.so] Error 1
Traceback (most recent call last):
  File "ffi/build.py", line 114, in <module>
    main()
  File "ffi/build.py", line 104, in main
    main_posix('linux', '.so')
  File "ffi/build.py", line 96, in main_posix
    subprocess.check_call(['make', '-f', makefile])
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-f', 'Makefile.linux']' returned non-zero exit status 2
error: command '/usr/bin/python' failed with exit status 1 

我不确定这个错误意味着什么,而且我的 google foo 不够强大,无法找到任何解决方案。有什么帮助吗?


要获取 llvm 3.6,您可以添加/etc/apt/sources.list.d/llvm.list文件::

# cat /etc/apt/sources.list.d/llvm.list
   deb http://llvm.org/apt/jessie/ llvm-toolchain-jessie main
   deb-src http://llvm.org/apt/jessie/ llvm-toolchain-jessie main
   # 3.6
   deb http://llvm.org/apt/jessie/ llvm-toolchain-jessie-3.6 main
   deb-src http://llvm.org/apt/jessie/ llvm-toolchain-jessie-3.6 main

您还需要添加密钥::

# gpg --keyserver pgpkeys.mit.edu --recv-key 15CF4D18AF4F7421
# gpg -a --export 15CF4D18AF4F7421 | apt-key add -

apt-get 更新并安装llvm-3.6::

apt-get update
apt-get install cython python-llvm build-essential libedit-dev
apt-get install llvm-3.6 llvm-3.6-dev llvm-dev

然后在你的 virtualenv::

pip install enum34
LLVM_CONFIG=/usr/lib/llvm-3.6/bin/llvm-config pip install llvmlite
LLVM_CONFIG=/usr/lib/llvm-3.6/bin/llvm-config pip install numba
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Debian 8 上的 Python numba / llvmlite - 我无法构建 llvmlite 的相关文章

  • 处理连接重置错误

    我有一个关于在 Python3 中处理 ConnectionResetError 的问题 当我使用 urllib request Request 函数时 通常会发生这种情况 我想知道如果我们遇到这样的错误是否可以重做请求 例如 def ge
  • 在单个图中,由“标签”列分割的所有列的箱线图

    看着箱线图 API 页面 http seaborn pydata org generated seaborn boxplot html seaborn boxplot 我想要看起来像这样的组合的东西 gt gt gt iris sns lo
  • Nonetype 错误/使用 python 的 beautifulsoup 没有打印任何元素

    所以我尝试使用 python 比较 2 个列表 其中一个包含我从网站获取的 1000 个链接 另一个包含一些单词 这些单词可能包含在第一个列表的链接中 如果是这种情况 我想得到一个输出 我打印了第一个列表 它确实有效 例如 如果链接是 ht
  • Pulp.pulpTestAll() 测试失败,太多值无法解压

    我的操作系统是window 7 Pulp版本是1 6 1 gurobi版本是7 0 1 可以成功导入gurobipy Pull solvers GUROBI确实通过了测试 所以我可以使用gurobi 然而 pulp solvers CPLE
  • 如何在 jupyter 笔记本中导入 scikit-learn?

    我创建了一个新的 conda 环境来使用 scikit learn 并使用conda install
  • Pandas:删除具有纳米值索引的行

    给定以下 pandas DataFrame 其中一些索引是NaN 如何删除第三行和第八行 因为它们的索引是NaN Thanks import pandas as pd import numpy as np data list abcdefg
  • python 函数中的任意数量的参数

    我想学习如何在 python 函数中传递任意数量的参数 所以我以递归方式编写了一个简单的 sum 函数 如下所示 def mySum args if len args 1 return args 0 else return args 1 m
  • PyCharm 虚拟环境和 Anaconda 环境有什么区别?

    当我在 PyCharm 中创建新项目时 它会创建一个新的虚拟环境 我读到 当我执行Python脚本时 它们是使用此环境中的解释器而不是系统环境来执行的 因此 如果我需要安装一些软件包 我只能将它们安装在这个环境中 而不是在系统环境中 这很酷
  • Python相对导入导致语法错误:无效语法

    我正在尝试安装这个很棒的 python 模块Python Chrono http oss codepoet no python chrono wiki Home我的 python 环境 但至少在 python 2 4 3 和 2 6 6 中
  • buildozer android NDK 未下载 Ubuntu

    我使用的是 Ubuntu 16 04 LTS 操作系统 我已经在 python2 和 python3 中安装了 buildozer android sdk 已安装 但 buildozer 在下载 android NDK 时显示错误 请帮我解
  • 如何使用不同的类和导入动态地使用 Python 日志记录来更改文件句柄

    我无法执行即时日志文件句柄更改 例如 我有3节课 one py import logging class One def init self txt logging debug Hey I m the class One and I say
  • 我无法在 docker 中安装 opencv-contrib-python

    我尝试安装opencv contrib python但我无法让它在 docker 上工作 它说找不到满足 opencv contrib python 要求的版本 I tried pip install opencv contrib pyth
  • 计算具有不均匀间隔点的 3D 梯度

    我目前有一个由几百万个不均匀间隔的粒子组成的体积 每个粒子都有一个属性 对于那些好奇的人来说是潜力 我想计算其局部力 加速度 np gradient 仅适用于均匀分布的数据 我在这里查看 numpy 中的二阶梯度 https stackov
  • 使用变量访问 Django 模板中的字典元素

    情况如下 我们渲染一个视图 return render request test html db object db object dict dict 在模板中 我们现在想要访问字典db object key 在Python中你通常会这样做
  • 将收藏计数器变成字典

    我有一个由该函数产生的集合结果 Counter df email address 它返回每个单独的电子邮件地址及其重复次数 Counter nan 1618 email protected cdn cgi l email protectio
  • Python 比 C++ 更快、更轻吗? [关闭]

    就目前情况而言 这个问题不太适合我们的问答形式 我们希望答案得到事实 参考资料或专业知识的支持 但这个问题可能会引发辩论 争论 民意调查或扩展讨论 如果您觉得这个问题可以改进并可能重新开放 访问帮助中心 help reopen questi
  • 如果我使用不同数量的核心,XGBoost 会产生相同的结果吗?

    我在两台机器上安装了完全相同版本的 XGBoost 0 4 两台机器之间的唯一区别是 RAM 和内核数量 8 与 16 使用完全相同的数据 我无法重现相同的结果 它们略有不同 小数点后第四 第五位 种子保留为默认值 它是高度特定于实现的 但
  • 识别输入的数据类型

    我正在尝试打印用户输入的数据类型并生成如下表 ABCDEFGH String 1 09 float 0 int true bool etc 我正在使用 Python 3 2 3 并且我知道我可以使用type 获取数据的类型 但在Python
  • 键入提示以返回类的实例,其中 typevar 是类类型[重复]

    这个问题在这里已经有答案了 如何编写返回类型提示来指示函数返回类 Class 的实例 Class TypeVar Class bound type def make class class Class gt Class return cla
  • 减小散点图的文件大小

    我目前正在尝试减小散点图的文件大小 我的代码如下所示 plt scatter a1 b1 plt savefig test ps 其中 a1 b1 是大小为 400 000 左右的数组 它给出的文件大小为 7 8MB 我尝试过添加 plt

随机推荐

  • os.environ 对 C 扩展模块的可见性

    如果我使用更改环境变量os environ 我之后导入的模块会看到这种变化吗 具体来说 sqlite3 requires https stackoverflow com a 23251896 336527使用环境变量来确定其临时文件位置 但
  • 当 URL 不正确时,curl_easy_perform 崩溃

    我在尝试使用下载文件时遇到问题libcurl 该程序使用多个线程 每个需要下载文件的线程都会创建一个libcurl处理来工作 当 URL 正确时 一切正常 但如果 URL 错误 程序就会崩溃 在调试模式下 如果 URL 不正确curl ea
  • 如何将弹出框 MATERIAL-UI 功能组件转换为基于类的组件?

    我正在尝试将此功能组件转换为基于类的组件 我已经尝试了几个小时但找不到放置这些的位置const组件中的变量 如果有人可以将其写在基于类的组件中 我们将不胜感激 const useStyles makeStyles theme gt typo
  • MIPS 汇编:从整数转换为十六进制

    我发现这个代码片段我认为可以将整数转换为十六进制 然而 我根本不遵循它 我添加了一些评论 说明了我认为正在发生的事情 但我不知道为什么要这样做 那么 假设我正确地注意到每行正在做什么 有人可以向我解释为什么要这样做吗 至于它如何以任何方式帮
  • 更新到 macos mavericks 后 gem install autotest-fsevent 失败

    更新到 Maveriks 后安装 gem 时遇到问题autotest fsevent 这是我得到的错误 Mellon public lasdolphin sudo gem install autotest fsevent Building
  • 是否有跨平台方法可以将资源嵌入到用 C++ 编写的二进制应用程序中? [复制]

    这个问题在这里已经有答案了 我试图将一些资源 图像 音乐和数据文件 捆绑到我的二进制应用程序 用 C 编写 中 我希望将所有内容都包含在一个可执行文件中 这样我就可以发送 大 可执行文件并且它可以工作 不能删除任何资产 我看到 Visual
  • .animate 回调函数之后的 .done

    我想在 animate 回调函数之后调用一个函数 我正在使用 done 方法来实现此目的 但它不起作用 fiddle http jsfiddle net dWAP4 function button click function div an
  • 向特定用户授予文件访问权限[关闭]

    Closed 这个问题是无关 help closed questions 目前不接受答案 在Linux中 如何向特定人员授予文件 文件夹的访问权限 换句话说 假设我只想允许只有用户 fred 能够读取文件 那么我该怎么做呢 请注意 我了解
  • 密码验证C++

    嗨 这是我第一次使用课程 所以对我糟糕的解释表示歉意 基本上我正在为电梯程序制作密码功能 LogIn 是我的类的名称 其中包含字符串 john 它是密码 除了错误密码尝试的循环之外 一切似乎都工作正常 如果第一次密码尝试正确 则代码可以正常
  • 成员函数特征

    我正在编写一个模板类 它包装成员函数以减少一些调用 如果某些条件为真 则不需要调用成员函数 签名看起来像这样 template
  • heroku 上的数据库名称以及用户、密码和主机

    我想在heroku 上安装一个带有数据库的php 脚本 如何获取我安装的数据库的数据库名称 密码 用户和主机信息 Heroku 上有多种不同的数据库 您可以查看选项并将它们添加到您的应用程序中 addons heroku com https
  • 如何调试 grails 命令

    当我运行 dbm generate changelog 时 抛出异常 我想调试这个脚本 但我不知道该怎么做 我尝试在脚本文件中放置断点 DatabaseMigrationCommon groovy然后在 eclipse 中创建新的 debu
  • AngularJS - 多次 ng-click - 事件冒泡

    在以下示例中 li h3 item title h3 li
  • Android 上的生物识别提示副标题文本被截断

    我已经实现了生物识别身份验证 其中我的副标题 验证用户名的生物识别信息以登录到我的App Name 有点长 最后会被截断 这主要发生在三星设备上 任何字符长度限制或 OEM 问题都无法解决 他们必须为此提出一个解决方案 因为我们无法控制它
  • 开发 Internet Explorer、浏览器辅助对象扩展?

    1 我正在尝试用 C 创建一个简单的 BHO 就像这里已经回答的那样 https stackoverflow com a 5740004 285594 https stackoverflow com a 5740004 285594 2 但
  • 沿最后一个维度索引 numpy nd 数组

    有没有一种简单的方法使用索引数组沿最后一个维度对 numpy 多维数组进行索引 例如 取一个数组a形状的 10 10 20 假设我有一个索引数组b 形状 10 10 这样结果就是c i j a i j b i j 我尝试过以下示例 a np
  • 仅向上缩放 Three.js 几何体

    我正在尝试缩放几何图形 y 轴 这使得我的立方体既放大又缩小 我认为 mesh transformY 可以将立方体动画放大到缩放值的一半 这会让立方体看起来像是向上缩放的 还有其他解决方案吗 var geometry new THREE B
  • 创建只能查看一个数据库并只能从中进行选择的用户?

    我们在 SQL Server 上有多个数据库 我们想要创建 1 个新用户 该用户可以查看数据库 c 但看不到其余数据库 该用户应该只能从此数据库中进行选择 而不能进行其他选择 我已经用谷歌搜索了一段时间 我发现的最接近的是拒绝查看任何数据库
  • 如何使用 phantomJS 模拟鼠标悬停在 HTML 元素上

    我有下面的 phantomJS 代码来获取 HTML 代码 var page require webpage create var url http example com page open url function status var
  • Debian 8 上的 Python numba / llvmlite - 我无法构建 llvmlite

    我尝试在 Debian 8 系统上安装 numba 如下所述 http llvmlite pydata org en latest install index html http llvmlite pydata org en latest