ubuntu add/remove software by command

本文详细介绍在Ubuntu系统中如何使用命令行工具安装、卸载、更新软件及管理软件包。包括使用apt-get和dpkg命令的具体操作方法,适用于Linux初学者和技术人员。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Ubuntu软件安装与删除相关命令
安装软件
命令: apt-get install softname1 softname2 softname3……
卸载软件
命令: apt-get remove softname1 softname2 softname3……
卸载并清除配置
命令: apt-get remove --purge softname1
更新软件信息数据库
命令: apt-get update
进行系统升级
命令: apt-get upgrade
搜索软件包
命令: apt-cache search softname1 softname2 softname3……
Deb软件包相关安装与卸载

安装deb软件包
命令: dpkg -i xxx.deb
删除软件包
命令:  dpkg -r xxx.deb
连同配置文件一起删除
命令: dpkg -r --purge xxx.deb
查看软件包信息
命令: dpkg -info xxx.deb
查看文件拷贝详情
命令: dpkg -L xxx.deb
查看系统中已安装软件包信息
命令: dpkg -l
重新配置软件包
命令:  dpkg-reconfigure xxx
zc@ubuntu:/data/TeamMember/zcl/zc/td$ conda create -n sa3d python=3.10 /data/software/anaconda3/lib/python3.12/site-packages/conda/base/context.py:198: FutureWarning: Adding 'defaults' to channel list implicitly is deprecated and will be removed in 25.3. To remove this warning, please choose a default channel explicitly with conda's regular configuration system, e.g. by adding 'defaults' to the list of channels: conda config --add channels defaults For more information see https://docs.conda.io/projects/conda/en/stable/user-guide/configuration/use-condarc.html deprecated.topic( Channels: - defaults Platform: linux-64 Collecting package metadata (repodata.json): - WARNING conda.gateways.repodata.jlap.fetch:request_url_jlap_state(322): Could not decompress https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch/repodata.json.zst as zstd. Fall back to .json. (zstd decompress error: Unknown frame descriptor) \ WARNING conda.gateways.repodata.jlap.fetch:request_url_jlap_state(322): Could not decompress https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/linux-64/repodata.json.zst as zstd. Fall back to .json. (zstd decompress error: Unknown frame descriptor| WARNING conda.gateways.repodata.jlap.fetch:request_url_jlap_state(322): Could not decompress https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/repodata.json.zst as zstd. Fall back to .json. (zstd decompress error: Unknown frame descriptor) WARNING conda.gateways.repodata.jlap.fetch:request_url_jlap_state(322): Could not decompress https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/noarch/repodata.json.zst as zstd. Fall back to .json. (zstd decompress error: Unknown frame descriptor) WARNING conda.gateways.repodata.jlap.fetch:request_url_jlap_state(322): Could not decompress https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/linux-64/repodata.json.zst as zstd. Fall back to .json. (zstd decompress error: Unknown frame descriptor) / WARNING conda.gateways.repodata.jlap.fetch:request_url_jlap_state(322): Could not decompress https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/noarch/repodata.json.zst as zstd. Fall back to .json. (zstd decompress error: Unknown frame descriptor) failed /data/software/anaconda3/lib/python3.12/site-packages/conda/base/context.py:198: FutureWarning: Adding 'defaults' to channel list implicitly is deprecated and will be removed in 25.3. To remove this warning, please choose a default channel explicitly with conda's regular configuration system, e.g. by adding 'defaults' to the list of channels: conda config --add channels defaults For more information see https://docs.conda.io/projects/conda/en/stable/user-guide/configuration/use-condarc.html deprecated.topic( # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/data/software/anaconda3/lib/python3.12/site-packages/conda/exception_handler.py", line 18, in __call__ return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/data/software/anaconda3/lib/python3.12/site-packages/conda/cli/main.py", line 61, in main_subshell exit_code = do_call(args, parser) ^^^^^^^^^^^^^^^^^^^^^ File "/data/software/anaconda3/lib/python3.12/site-packages/conda/cli/conda_argparse.py", line 205, in do_call result = getattr(module, func_name)(args, parser) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/software/anaconda3/lib/python3.12/site-packages/conda/notices/core.py", line 132, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/data/software/anaconda3/lib/python3.12/site-packages/conda/cli/main_create.py", line 154, in execute return install(args, parser, "create") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/software/anaconda3/lib/python3.12/site-packages/conda/cli/install.py", line 417, in install unlink_link_transaction = solver.solve_for_transaction( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/software/anaconda3/lib/python3.12/site-packages/conda/core/solve.py", line 152, in solve_for_transaction unlink_precs, link_precs = self.solve_for_diff( ^^^^^^^^^^^^^^^^^^^^ File "/data/software/anaconda3/lib/python3.12/site-packages/conda/core/solve.py", line 221, in solve_for_diff final_precs = self.solve_final_state( ^^^^^^^^^^^^^^^^^^^^^^^ File "/data/software/anaconda3/lib/python3.12/site-packages/conda_libmamba_solver/solver.py", line 231, in solve_final_state index = IndexHelper( ^^^^^^^^^^^^ File "/data/software/anaconda3/lib/python3.12/site-packages/conda_libmamba_solver/index.py", line 136, in __init__ self._index = self._load_channels() ^^^^^^^^^^^^^^^^^^^^^ File "/data/software/anaconda3/lib/python3.12/site-packages/conda_libmamba_solver/index.py", line 335, in _load_channels jsons = {url: str(path) for (url, path) in executor.map(self._fetch_channel, urls)} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/software/anaconda3/lib/python3.12/concurrent/futures/_base.py", line 619, in result_iterator yield _result_or_cancel(fs.pop()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/software/anaconda3/lib/python3.12/concurrent/futures/_base.py", line 317, in _result_or_cancel return fut.result(timeout) ^^^^^^^^^^^^^^^^^^^ File "/data/software/anaconda3/lib/python3.12/concurrent/futures/_base.py", line 456, in result return self.__get_result() ^^^^^^^^^^^^^^^^^^^ File "/data/software/anaconda3/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result raise self._exception File "/data/software/anaconda3/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/software/anaconda3/lib/python3.12/site-packages/conda_libmamba_solver/index.py", line 254, in _fetch_channel json_path, _ = subdir_data.repo_fetch.fetch_latest_path() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/software/anaconda3/lib/python3.12/site-packages/conda/gateways/repodata/__init__.py", line 749, in fetch_latest_path _, state = self.fetch_latest() ^^^^^^^^^^^^^^^^^^^ File "/data/software/anaconda3/lib/python3.12/site-packages/conda/gateways/repodata/__init__.py", line 873, in fetch_latest raw_repodata = self.cache_path_json.read_text() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/software/anaconda3/lib/python3.12/pathlib.py", line 1028, in read_text return f.read() ^^^^^^^^ File "<frozen codecs>", line 322, in decode UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc9 in position 465: invalid continuation byte `$ /data/software/anaconda3/bin/conda create -n sa3d python=3.10` environment variables: CIO_TEST=<not set> CONDA_ALLOW_SOFTLINKS=false CONDA_DEFAULT_ENV=base CONDA_EXE=/data/software/anaconda3/bin/conda CONDA_PREFIX=/data/software/anaconda3 CONDA_PROMPT_MODIFIER=(base) CONDA_PYTHON_EXE=/data/software/anaconda3/bin/python CONDA_ROOT=/data/software/anaconda3 CONDA_SHLVL=1 CURL_CA_BUNDLE=<not set> LD_LIBRARY_PATH=:/usr/local/cuda-12.2/lib64 LD_PRELOAD=<not set> PATH=/data/software/anaconda3/bin:/data/software/anaconda3/condabin:/usr/lo cal/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/ local/games:/snap/bin:/usr/local/cuda-12.2/bin REQUESTS_CA_BUNDLE=<not set> SSL_CERT_FILE=<not set> active environment : base active env location : /data/software/anaconda3 shell level : 1 user config file : /home/zc/.condarc populated config files : /home/zc/.condarc conda version : 24.9.2 conda-build version : 24.9.0 python version : 3.12.7.final.0 solver : libmamba (default) virtual packages : __archspec=1=icelake __conda=24.9.2=0 __cuda=12.4=0 __glibc=2.31=0 __linux=5.4.0=0 __unix=0=0 base environment : /data/software/anaconda3 (read only) conda av data dir : /data/software/anaconda3/etc/conda conda av metadata url : None channel URLs : https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/linux-64 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/noarch https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/linux-64 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/noarch package cache : /data/software/anaconda3/pkgs /home/zc/.conda/pkgs envs directories : /data/TeamMember/zcl/zc/conda/envs /data/TeamMember/zcl/zc/.conda/envs /home/zc/.conda/envs /data/software/anaconda3/envs platform : linux-64 user-agent : conda/24.9.2 requests/2.32.3 CPython/3.12.7 Linux/5.4.0-144-generic ubuntu/20.04.6 glibc/2.31 solver/libmamba conda-libmamba-solver/24.9.0 libmambapy/1.5.8 aau/0.4.4 c/. s/. e/. UID:GID : 1004:0 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> If submitted, this report will be used by core maintainers to improve future releases of conda. Would you like conda to send this report to the core maintainers? [y/N]: y Upload did not complete. Thank you for helping to improve conda. Opt-in to always sending reports (and not see this message again) by running $ conda config --set report_errors true 创建环境报错
最新发布
07-24
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值