我需要 Qt5 .pc pkg-config 文件来编译这个应用程序。当然,我可以使用官方 Qt 在线安装程序安装整个 Qt5 开发环境。
但我想知道我是否可以只为包含 *.pc 文件的必需模块(核心、小部件和 gui)安装一些 Ubuntu 软件包。
我尝试安装libqt5widget5
,但它似乎不提供 pc文件。我也搜索过,apt-cache search
但没有发现任何相关内容。
我正在按照这些说明在 Ubuntu 22.04 上安装 ODBC 驱动程序 v18。我知道该脚本不想为 Ubuntu 22.04 安装任何东西,但我敢打赌这是一个错字,因为22.04的存储库确实存在。
发出后:
sudo su
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list > /etc/apt/sources.list.d/mssql-release.list
exit
sudo apt-get update
它没有找到版本 18:
$ apt-cache search msodbc
msodbcsql17 - ODBC Driver for Microsoft(R) SQL Server(R)
我在这里有什么错?
回答后测试代码mizera
:
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
$SERVER = "192.168.0.50";
$DATABASE = "DB";
$DRIVER = "/usr/lib/libmsodbcsql-18.so";
const USERNAME = "user";
const PASSWORD = "pswd";
try {
$db = new PDO("odbc:driver=$DRIVER;server=$SERVER;database=$DATABASE", USERNAME, PASSWORD);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
echo '<div class="alert alert-danger" role="alert">';
echo "Connection to database failed:" . PHP_EOL . $e->getMessage();
echo '</div>';
var_dump($e);
}
输出是:
object(PDOException)#3 (8) { ["message":protected]=> string(21) "could not find driver" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(27) "/home/user/www/database.php" ["line":protected]=> int(25) ["trace":"Exception":private]=> array(2) { [0]=> array(5) { ["file"]=> string(27) "/home/user/www/database.php" ["line"]=> int(25) ["function"]=> string(11) "__construct" ["class"]=> string(3) "PDO" ["type"]=> string(2) "->" } [1]=> array(4) { ["file"]=> string(25) "/home/user/www/tables.php" ["line"]=> int(2) ["args"]=> array(1) { [0]=> string(27) "/home/user/www/database.php" } ["function"]=> string(7) "require" } } ["previous":"Exception":private]=> NULL ["errorInfo"]=> NULL }
我刚刚从 19.10 升级到 20.04。一切都很好,但我的mysql有问题。这里是当前安装的包:
$ dpkg -l | grep mysql
ii libmysqlclient21:amd64 8.0.20-0ubuntu0.20.04.1 amd64 MySQL database client library
ii mysql-apt-config 0.8.15-1 all Auto configuration for MySQL APT Repo.
ii mysql-common 8.0.19-1ubuntu19.10 amd64 Common files shared between packages
ii php-mysql 2:7.4+75 all MySQL module for PHP [default]
ii php7.4-mysql 7.4.3-4ubuntu1.1 amd64 MySQL module for PHP
我需要安装mysql-server
才能使用该mysql
命令。但:
mysql-server 依赖于 mysql-server-8.0 但不会安装
尝试安装mysql-server-8.0
:
mysql-server 依赖于 mysql-client-8.0 但不会安装
尝试安装mysql-client-8.0
:
mysql-client-8.0 : 依赖于 mysql-common (>= 5.5)
但我有mysql-common
8.0.19 版本,所以应该满足依赖!我也尝试删除mysql-common
以再次安装它,但它会删除我系统的一半:
colord gnome-control-center hplip libhpmud0 libmysqlclient21 libsane libsane-hpaio libsnmp35 mysql-common printer-driver-hpcups sane-utils ubuntu-desktop ubuntu-desktop-minimal
我也尝试过:
sudo apt-get autoclean
sudo apt-get update
sudo apt-get install --reinstall mysql-server
我该如何解决这种情况?
$ sudo apt install mysql-server-8.0
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze
Lettura informazioni sullo stato... Fatto
Alcuni pacchetti non possono essere installati. Questo può voler dire
che è stata richiesta una situazione impossibile oppure, se si sta
usando una distribuzione in sviluppo, che alcuni pacchetti richiesti
non sono ancora stati creati o sono stati rimossi da Incoming.
Le seguenti informazioni possono aiutare a risolvere la situazione:
I seguenti pacchetti hanno dipendenze non soddisfatte:
mysql-server-8.0 : Pre-dipende: mysql-common (>= 5.5)
Dipende: mysql-client-8.0 (>= 8.0.20-0ubuntu0.20.04.1) ma non sta per essere installato
Dipende: mysql-common (>= 5.8+1.0.4~)
E: Impossibile correggere i problemi, ci sono pacchetti danneggiati bloccati.
多年后我回到了 Ubuntu,但在我的局域网中,我仍然需要一些装有 Windows 7 的机器。
现在我正在运行 Ubuntu 19.10,我想共享一个文件夹。我做了以下步骤:
因为我的安装是意大利语的,我不知道英文版的确切单词,我希望我在说什么清楚。
然后我打开了我的 Windows 机器,在网络上我看到了我的 Ubuntu 机器。双击它会显示共享文件夹。要进入它,它要求登录。好的。
好吧,我输入了我的 Ubuntu 用户的用户名/密码,因为“免费访问”标志显示:“谁没有用户帐户”。我有它,我知道凭据,但它们被拒绝了。
因此,我想知道“用户帐户”在这种情况下实际上是什么意思。它不是指 Ubuntu 帐户(共享文件夹的所有者)吗?