我尝试安装一些 PHP 模块:
zypper install php7.0-gd php7.0-mcrypt php7.0-curl php7.0-intl php7.0-xsl php7.0-mbstring php7.0-openssl php7.0-zip php7.0-soap
输出:
Failed to mount cd:///?devices=/dev/disk/by-id/ata-VMware_Virtual_IDE_CDROM_Drive_10000000000000000001 on /var/tmp/AP_0xgQO1rM: Mounting media failed (mount: /var/tmp/AP_0xgQO1rM: no medium found on /dev/sr0.)
Please insert medium [] #1 and type 'y' to continue or 'n' to cancel the operation. [yes/no] (no): no
Error building the cache:
[openSUSE-Leap-15.0-1|cd:///?devices=/dev/disk/by-id/ata-VMware_Virtual_IDE_CDROM_Drive_10000000000000000001] Valid metadata not found at specified URL
Warning: Skipping repository 'openSUSE-Leap-15.0-1' because of the above error.
Some of the repositories have not been refreshed because of an error.
Loading repository data...
Reading installed packages...
'php7.0-curl' not found in package names. Trying capabilities.
No provider of 'php7.0-curl' found.
'php7.0-gd' not found in package names. Trying capabilities.
No provider of 'php7.0-gd' found.
'php7.0-intl' not found in package names. Trying capabilities.
No provider of 'php7.0-intl' found.
'php7.0-mbstring' not found in package names. Trying capabilities.
No provider of 'php7.0-mbstring' found.
'php7.0-mcrypt' not found in package names. Trying capabilities.
No provider of 'php7.0-mcrypt' found.
'php7.0-openssl' not found in package names. Trying capabilities.
No provider of 'php7.0-openssl' found.
'php7.0-soap' not found in package names. Trying capabilities.
No provider of 'php7.0-soap' found.
'php7.0-xsl' not found in package names. Trying capabilities.
No provider of 'php7.0-xsl' found.
'php7.0-zip' not found in package names. Trying capabilities.
No provider of 'php7.0-zip' found.
Resolving package dependencies...
Nothing to do.
我认为我的存储库有问题。它尝试从磁盘(cd:///?devices=/dev/disk/by-id/ata-VMware_Virtual_IDE_CDROM_Drive_100000000000000000001)而不是从 Internet 加载存储库。但是光盘不再插入,我不能,因为它是我公司的虚拟机,并且管理员正在休假。
zypper lr -uP:
# | Alias | Name | Enabled | GPG Check | Refresh | Priority | URI
---+---------------------------+-----------------------------------------+---------+-----------+---------+----------+---------------------------------------------------------------------------------------
1 | openSUSE-Leap-15.0-1 | openSUSE-Leap-15.0-1 | Yes | ( p) Yes | No | 99 | cd:///?devices=/dev/disk/by-id/ata-VMware_Virtual_IDE_CDROM_Drive_10000000000000000001
2 | packman.inode.at-suse | Packman Repository | Yes | (r ) Yes | Yes | 99 | http://packman.inode.at/suse/openSUSE_Leap_15.0/
3 | repo-debug | openSUSE-Leap-15.0-Debug | No | ---- | ---- | 99 | http://download.opensuse.org/debug/distribution/leap/15.0/repo/oss/
4 | repo-debug-non-oss | openSUSE-Leap-15.0-Debug-Non-Oss | No | ---- | ---- | 99 | http://download.opensuse.org/debug/distribution/leap/15.0/repo/non-oss/
5 | repo-debug-update | openSUSE-Leap-15.0-Update-Debug | No | ---- | ---- | 99 | http://download.opensuse.org/debug/update/leap/15.0/oss/
6 | repo-debug-update-non-oss | openSUSE-Leap-15.0-Update-Debug-Non-Oss | No | ---- | ---- | 99 | http://download.opensuse.org/debug/update/leap/15.0/non-oss/
7 | repo-non-oss | openSUSE-Leap-15.0-Non-Oss | Yes | (r ) Yes | Yes | 99 | http://download.opensuse.org/distribution/leap/15.0/repo/non-oss/
8 | repo-oss | openSUSE-Leap-15.0-Oss | Yes | (r ) Yes | Yes | 99 | http://download.opensuse.org/distribution/leap/15.0/repo/oss/
9 | repo-source | openSUSE-Leap-15.0-Source | No | ---- | ---- | 99 | http://download.opensuse.org/source/distribution/leap/15.0/repo/oss/
10 | repo-source-non-oss | openSUSE-Leap-15.0-Source-Non-Oss | No | ---- | ---- | 99 | http://download.opensuse.org/source/distribution/leap/15.0/repo/non-oss/
11 | repo-update | openSUSE-Leap-15.0-Update | Yes | (r ) Yes | Yes | 99 | http://download.opensuse.org/update/leap/15.0/oss/
12 | repo-update-non-oss | openSUSE-Leap-15.0-Update-Non-Oss | Yes | (r ) Yes | Yes | 99 | http://download.opensuse.org/update/leap/15.0/non-oss/
如何更改存储库以便从 Internet 加载?
我知道我可以使用 修改现有的 repo zypper modifyrepo
,但是如何修改 URI 以及在哪里可以找到正确的 URI?