-bash: locate: command not found 以及No package locate available. 解决办法

安装:

yum -y install mlocate

安装完以后更新库:

updatedb

如果不更新,会报如下错误:

[root@yunwei ~]# locate my.cnf

locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory

好了,下边就可以正常使用了。 举例:

[root@yunwei src]# locate my.cnf
/etc/my.cnf
/etc/my.cnf.d
/etc/my.cnf.d/client.cnf
/etc/my.cnf.d/mysql-default-authentication-plugin.cnf
/etc/my.cnf.d/mysql-server.cnf
sudo apt-get update sudo apt-get install ubuntu-make [sudo] password for sqa: Hit:1 http://cn.archive.ubuntu.com/ubuntu jammy InRelease Get:2 http://cn.archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB] Hit:3 https://typora.io/linux ./ InRelease Get:4 http://cn.archive.ubuntu.com/ubuntu jammy-backports InRelease [127 kB] Get:5 http://cn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 DEP-11 Metadata [103 kB] Get:6 http://cn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 c-n-f Metadata [18.5 kB] Get:7 http://cn.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 DEP-11 Metadata [212 B] Get:8 http://cn.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 DEP-11 Metadata [359 kB] Get:9 http://cn.archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 DEP-11 Metadata [940 B] Get:10 http://cn.archive.ubuntu.com/ubuntu jammy-backports/main amd64 DEP-11 Metadata [7,080 B] Get:11 http://cn.archive.ubuntu.com/ubuntu jammy-backports/restricted amd64 DEP-11 Metadata [212 B] Get:12 http://cn.archive.ubuntu.com/ubuntu jammy-backports/universe amd64 DEP-11 Metadata [22.9 kB] Get:13 http://cn.archive.ubuntu.com/ubuntu jammy-backports/multiverse amd64 DEP-11 Metadata [212 B] Hit:15 https://download.docker.com/linux/ubuntu jammy InRelease Hit:16 https://dl.google.com/linux/chrome/deb stable InRelease Get:17 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB] Get:18 http://security.ubuntu.com/ubuntu jammy-security/main amd64 DEP-11 Metadata [43.1 kB] Get:19 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 DEP-11 Metadata [208 B] Get:20 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 DEP-11 Metadata [125 kB] Get:21 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 DEP-11 Metadata [208 B] Get:14 https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu jammy InRelease [29.9 kB] Err:14 https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu jammy InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F6609E60DC62814E Reading package lists... Done W: GPG error: https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F6609E60DC62814E E: The repository 'https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu jammy InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package ubuntu-make sqa@sqa-Precision-3480:~$ umake android Command 'umake' not found, but can be installed with: sudo snap install ubuntu-make
03-29
C:\Users\16079>wsl.exe -d Ubuntu-24.04 hkw@localhost:/mnt/c/Users/16079$ ollama run deepseek-r1:1.5b Error: llama runner process has terminated: exit status 127 hkw@localhost:/mnt/c/Users/16079$ ls /usr/local/cuda-12.x ls: cannot access '/usr/local/cuda-12.x': No such file or directory hkw@localhost:/mnt/c/Users/16079$ sudo apt install --reinstall cuda-toolkit-12-0 # 根据实际版本调整 [sudo] password for hkw: Reading package lists... Done Building dependency tree... Done Reading state information... Done N: Ignoring file 'ubuntu.sources.save.1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension N: Ignoring file 'ubuntu.sources.save.2' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension E: Unable to locate package cuda-toolkit-12-0 hkw@localhost:/mnt/c/Users/16079$ ./ollama_llama_server -bash: ./ollama_llama_server: No such file or directory hkw@localhost:/mnt/c/Users/16079$ nvidia-smi # 查看驱动版本和GPU状态 Thu Mar 13 20:40:10 2025 +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 565.75 Driver Version: 566.26 CUDA Version: 12.7 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA GeForce RTX 4050 ... On | 00000000:01:00.0 Off | N/A | | N/A 42C P8 1W / 78W | 0MiB / 6141MiB | 0% Default | | | | N/A | +-----------------------------------------+------------------------+---------
03-14
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值