NB_linkBBG 2024-01-05 22:01
浏览 66
已结题

通过 pak 包管理器安装R包报错,pak::pkg_install("omnideconv/omnideconv"),求解原因


Error: 
! error in pak subprocess
Caused by error in `stop_task_build(state, worker)`:
! Failed to build source package 'omnideconv'
Full installation output:
* installing *source* package ‘omnideconv’ ...
staged installation is only possible with locking
** using non-staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded
+ /home/nb/.local/share/r-miniconda/bin/conda 'install' '--yes' '--prefix' '/home/nb/.local/share/r-miniconda/envs/r-omnideconv' '-c' 'conda-forge' 'anndata>=0.7.5'
Retrieving notices: ...working... done
Collecting package metadata (current_repodata.json): ...working... failed

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/exception_handler.py", line 17, in __call__
        return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/cli/main.py", line 64, in main_subshell
        exit_code = do_call(args, parser)
                    ^^^^^^^^^^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/cli/conda_argparse.py", line 167, in do_call
        result = getattr(module, func_name)(args, parser)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/notices/core.py", line 119, in wrapper
        return_value = func(*args, **kwargs)
                       ^^^^^^^^^^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/cli/main_install.py", line 26, in execute
        install(args, parser, "install")
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/cli/install.py", line 316, in install
        unlink_link_transaction = solver.solve_for_transaction(
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/core/solve.py", line 154, in solve_for_transaction
        unlink_precs, link_precs = self.solve_for_diff(
                                   ^^^^^^^^^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/core/solve.py", line 215, in solve_for_diff
        final_precs = self.solve_final_state(
                      ^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/core/solve.py", line 358, in solve_final_state
        ssc = self._collect_all_metadata(ssc)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/common/io.py", line 84, in decorated
        return f(*args, **kwds)
               ^^^^^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/core/solve.py", line 572, in _collect_all_metadata
        index, r = self._prepare(prepared_specs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/core/solve.py", line 1286, in _prepare
        reduced_index = get_reduced_index(
                        ^^^^^^^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/core/index.py", line 287, in get_reduced_index
        new_records = SubdirData.query_all(
                      ^^^^^^^^^^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/core/subdir_data.py", line 158, in query_all
        result = tuple(
                 ^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/concurrent/futures/_base.py", line 619, in result_iterator
        yield _result_or_cancel(fs.pop())
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/concurrent/futures/_base.py", line 317, in _result_or_cancel
        return fut.result(timeout)
               ^^^^^^^^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/concurrent/futures/_base.py", line 449, in result
        return self.__get_result()
               ^^^^^^^^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
        raise self._exception
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/concurrent/futures/thread.py", line 58, in run
        result = self.fn(*self.args, **self.kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/core/subdir_data.py", line 143, in subdir_query
        return tuple(
               ^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/core/subdir_data.py", line 165, in query
        self.load()
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/core/subdir_data.py", line 265, in load
        _internal_state = self._load()
                          ^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/core/subdir_data.py", line 322, in _load
        repodata, state = fetcher.fetch_latest_parsed()
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/gateways/repodata/__init__.py", line 758, in fetch_latest_parsed
        parsed, state = self.fetch_latest()
                        ^^^^^^^^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/gateways/repodata/__init__.py", line 820, in fetch_latest
        cache.load_state()
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/gateways/repodata/__init__.py", line 626, in load_state
        self.load(state_only=True)
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/site-packages/conda/gateways/repodata/__init__.py", line 576, in load
        state = json.loads(state_file.read())
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/json/__init__.py", line 346, in loads
        return _default_decoder.decode(s)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/nb/.local/share/r-miniconda/lib/python3.11/json/decoder.py", line 340, in decode
        raise JSONDecodeError("Extra data", s, end)
    json.decoder.JSONDecodeError: Extra data: line 9 column 2 (char 289)

`$ /home/nb/.local/share/r-miniconda/bin/conda install --yes --prefix /home/nb/.local/share/r-miniconda/envs/r-omnideconv -c conda-forge anndata>=0.7.5`

  environment variables:
                 CIO_TEST=<not set>
               CONDA_ROOT=/home/nb/.local/share/r-miniconda
           CURL_CA_BUNDLE=<not set>
          LD_LIBRARY_PATH=/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-
                          java/lib/server:/usr/lib/R/lib:/usr/lib/x86_64-linux-
                          gnu:/usr/lib/jvm/default-
                          java/lib/server:/usr/lib/R/lib:/usr/lib/x86_64-linux-
                          gnu:/usr/lib/jvm/default-
                          java/lib/server:/usr/lib/R/lib:/usr/lib/x86_64-linux-
                          gnu:/usr/lib/jvm/default-
                          java/lib/server:/usr/lib/R/lib:/lib:/usr/lib/x86_64-linux-
                          gnu:/usr/lib/jvm/default-java/lib/server
               LD_PRELOAD=<not set>
                     PATH=/home/nb/.local/share/r-miniconda/condabin:/home/nb/.local/share/r-
                          miniconda/bin:/home/nb/.local/share/r-miniconda/envs/r-
                          omnideconv/bin:/home/nb/.local/share/r-
                          miniconda/condabin:/home/nb/.local/share/r-
                          miniconda/condabin:/home/nb/.local/share/r-
                          miniconda/bin:/home/nb/.local/share/r-
                          miniconda/condabin:/home/nb/.local/share/r-
                          miniconda/bin:/home/nb/.local/share/r-
                          miniconda/condabin:/home/nb/.local/share/r-
                          miniconda/bin:/home/nb/.local/share/r-miniconda/envs/r-
                          omnideconv/bin/python;/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bi
                          n:/sbin:/bin:/snap/bin:/usr/lib/rstudio-
                          server/bin/quarto/bin:/usr/lib/rstudio-server/bin/postback
               PYTHONPATH=
       REQUESTS_CA_BUNDLE=<not set>
   RMARKDOWN_MATHJAX_PATH=/usr/lib/rstudio-server/resources/mathjax-27
        RS_RPOSTBACK_PATH=/usr/lib/rstudio-server/bin/rpostback
RS_SERVER_RPC_SOCKET_PATH=/var/run/rstudio-server/rstudio-rserver/session-server-rpc.socket
            SSL_CERT_FILE=<not set>

     active environment : None
       user config file : /home/nb/.condarc
 populated config files : /home/nb/.condarc
          conda version : 23.7.4
    conda-build version : not installed
         python version : 3.11.4.final.0
       virtual packages : __archspec=1=x86_64
                          __glibc=2.27=0
                          __linux=5.4.0=0
                          __unix=0=0
       base environment : /home/nb/.local/share/r-miniconda  (writable)
      conda av data dir : /home/nb/.local/share/r-miniconda/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/linux-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/noarch
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/nb/.local/share/r-miniconda/pkgs
                          /home/nb/.conda/pkgs
       envs directories : /home/nb/.local/share/r-miniconda/envs
                          /home/nb/.conda/envs
               platform : linux-64
             user-agent : conda/23.7.4 requests/2.31.0 CPython/3.11.4 Linux/5.4.0-150-generic ubuntu/18.04.6 glibc/2.27
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False


An unexpected error has occurred. Conda has prepared the above report.
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.

Example: conda --no-plugins install <package>

Alternatively, you can set the CONDA_NO_PLUGINS environment variable on
the command line to run the command without plugins enabled.

Example: CONDA_NO_PLUGINS=true conda install <package>

Upload successful.
Error: package or namespace load failed for ‘omnideconv’:
 loadNamespace()里算'omnideconv'时.onLoad失败了,详细内容:
  调用: NULL
  错误: one or more Python packages failed to install [error code 1]
错误: 载入失败
停止执行
ERROR: loading failed
* removing ‘/tmp/Rtmp91Nphf/pkg-lib78a276eb8129/omnideconv’
---
Backtrace:
1. pak::pkg_install("omnideconv/omnideconv")
2. pak:::remote(function(...) get("pkg_install_do_plan", asNamespace("pak"))(...), …
3. err$throw(res$error)
---
Subprocess backtrace:
 1. base::withCallingHandlers(cli_message = function(msg) { …
 2. get("pkg_install_do_plan", asNamespace("pak"))(...)
 3. proposal$install()
 4. pkgdepends::install_package_plan(plan, lib = private$library, num_workers = nw, …
 5. base::withCallingHandlers({ …
 6. pkgdepends:::handle_events(state, events)
 7. pkgdepends:::handle_event(state, i)
 8. pkgdepends:::stop_task(state, worker)
 9. pkgdepends:::stop_task_build(state, worker)
10. base::throw(new_pkg_build_error("Failed to build source package {pkg}", …
11. | base::signalCondition(cond)
12. global (function (e) …
  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 1月13日
    • 创建了问题 1月5日