我目前在Ubuntu22.04.1版本,但我使用的软件,严格需要gcc 4.8 (根据安装指南)。我怎么安装它?
sudo apt-get install g++-4.8
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package g++-4.8
E: Couldn't find any package by glob 'g++-4.8'
E: Couldn't find any package by regex 'g++-4.8'
我怎么才能解决这个问题?
发布于 2023-01-19 02:54:48
gcc-4.8和g++-4.8包已经在Ubuntu20.04和更高版本的默认存储库中停止使用,但它们仍然可以在Ubuntu18.04默认存储库中使用。要在Ubuntu22.04中从Ubuntu18.04安装gcc-4.8和g+-4.8软件包,请运行以下命令:
cd Desktop/
mkdir install_g++-4.8
cd install_g++-4.8/
sudo apt update
wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/g++-4.8_4.8.5-4ubuntu8_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/libstdc++-4.8-dev_4.8.5-4ubuntu8_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/gcc-4.8-base_4.8.5-4ubuntu8_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/gcc-4.8_4.8.5-4ubuntu8_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/libgcc-4.8-dev_4.8.5-4ubuntu8_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/cpp-4.8_4.8.5-4ubuntu8_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-4.8/libasan0_4.8.5-4ubuntu8_amd64.deb
sudo apt install ./gcc-4.8_4.8.5-4ubuntu8_amd64.deb ./gcc-4.8-base_4.8.5-4ubuntu8_amd64.deb ./libstdc++-4.8-dev_4.8.5-4ubuntu8_amd64.deb ./cpp-4.8_4.8.5-4ubuntu8_amd64.deb ./libgcc-4.8-dev_4.8.5-4ubuntu8_amd64.deb ./libasan0_4.8.5-4ubuntu8_amd64.deb ./g++-4.8_4.8.5-4ubuntu8_amd64.deb
或者,为了节省时间,您可以在一个一行wget命令中下载所有7个.deb文件,但这7个单独的wget命令使您更容易检查是否已成功下载了所有所需的.deb文件。
https://askubuntu.com/questions/1450426
复制相似问题