AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-876135

SDIdo's questions

Martin Hope
SDIdo
Asked: 2018-10-24 07:19:27 +0800 CST

找不到命令“gcc”,但可以使用.. ubuntu 18.04 安装

  • 2

嗨,因为我的默认 gcc 不能,不久前我安装了一个新的 gcc 来编译汇编文件

sudo apt install gcc-4.8

现在,为了使用 gcc SomeProgam.s 命令 gcc-4.8 SomeProgram.s 我已经将我的 gcc 指向 gcc-4.8(或者我认为..)

我使用了以下命令(安装 gcc-4.8 之后):

$ sudo rm usr/bin/gcc
$ sudo ln -s usr/bin/gcc-4.8 /usr/bin/gcc

但是现在我在尝试让 gcc 编译时收到此消息

Command 'gcc' not found, but can be installed with:

sudo apt install gcc

gcc-4.8 SomeProgram.s 仍然有效。

再次安装 gcc 后,我得到暗示我已经拥有 gcc 的信息

但是好像不能用。 所以一定是指点有问题。

请帮我取回我的 gcc。请帮我将 gcc 命令指向 gcc-4.8。

先谢谢了。

compiling gcc 18.04
  • 1 个回答
  • 29504 Views
Martin Hope
SDIdo
Asked: 2018-10-20 01:34:16 +0800 CST

gcc -Hello.s 问题

  • 2

我的系统是 Ubuntu 18.04 64bit 。 安装了 build-essentials 和 devtools。

你好,我有一个名为 Hello.s 的程序集文件,内容如下:

        #This is a simple "Hello World!" program
    .section    .rodata #read only data section
str:    .string "Hello World!\n"
    ########
    .text   #the beginnig of the code
.globl  main    #the label "main" is used to state the initial point of this program
    .type   main, @function # the label "main" representing the beginning of a function
main:   # the main function:
    pushq   %rbp        #save the old frame pointer
    movq    %rsp,   %rbp    #create the new frame pointer

    movq    $str,%rdi   #the string is the only paramter passed to the printf function (remember- first parameter goes in %rdi).
    movq    $0,%rax
    call    printf      #calling to printf AFTER we passed its parameters.

    #return from printf:
    movq    $0, %rax    #return value is zero (just like in c - we tell the OS that this program finished seccessfully)
    movq    %rbp, %rsp  #restore the old stack pointer - release all used memory.
    popq    %rbp        #restore old frame pointer (the caller function frame)
    ret         #return to caller function (OS)

尝试使用 gcc -Hello.s 编译它会返回以下消息:

/usr/bin/ld: /tmp/ccY9hdWi.o: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC

/usr/bin/ld:最终链接失败:输出 collect2 上的不可表示部分:错误:ld 返回 1 退出状态

尝试了没有效果的 gcc -fPIC Hello.s - 带来了相同的消息。

有人告诉我安装gcc-4.8,那没用

还建议安装以前版本的 ubuntu.. 在我看来,这是最后的手段。

有什么建议么?

compiling gcc 18.04 assembler
  • 1 个回答
  • 779 Views
Martin Hope
SDIdo
Asked: 2018-10-01 00:36:54 +0800 CST

netbeans 缺少本机构建工具

  • 1

我的目标 我想在我的 ubuntu 18.04 上拥有一个功能齐全的 NetBeans C/C++

一个小背景 我遇到的第一个问题是

构建主机未连接

经过一番研究,我发现我需要手动安装编译器,所以我做了以下操作:使用终端安装 gcc、gpp、g++ 和 mingw

sudo apt-get install <product_name>

它有帮助,我向前迈了一步,创建了一个 C 程序,然后按下构建按钮,却遇到了第二个问题:

当前问题:

netbeans 缺少本机构建工具

到目前为止我采取的步骤:

我知道我必须以某种方式获得 MYSYS(来源:http ://www.testerlogic.com/guide-configure-netbeans-ide-c/ ),但无法找出如何在 linux 上使用,所以我做了更多的挖掘工作这个问题: https ://stackoverflow.com/questions/2287380/setting-up-netbeans-for-c/2453750

没有完全回答,提供的 NetBeans 指南链接将我们引导到 linux 部分的断开链接 。https://netbeans.org/community/releases/67/cpp-setup-instructions.html Linux 上的 Sun Studio 12 编译器已损坏。 来自 Oracle 的道歉信息

但这真的是问题吗?我需要这个 Sun Studio 12 编译器吗?或者我还应该做些什么来获得 NetBeans 所需的这个 MYSYS 部分?

进一步思考:

如何使用终端仅安装 mingw 的相关部分,然后按照 NetBeans 的要求安装 MYSYS 的补充部分?

或者有没有其他方法可以解决这个问题

空 Make 命令问题

?

ps我在尝试安装时安装了 gdb,如终端所示sudo apt-get install gdb

先谢谢了。

netbeans c c++ localhost gdb
  • 1 个回答
  • 1726 Views
Martin Hope
SDIdo
Asked: 2018-09-29 06:09:41 +0800 CST

如果您打算使用已经创建的文件系统,请注意...在重新安装 Ubuntu 18.04 时

  • 2

你好,我是新来的

If I've made any mistake with this question please let me know and pardon me with time to edit it. Thanks.

我的目的地:

我正在尝试在我的戴尔 Inspiron 灵越 13 5000series i7中重新安装我的 Ubuntu 18.04 64 位。我目前有两个操作系统 Win10 和 Ubuntu 18.04 作为dual-boot。

我已经备份了所有内容,但如果我可以在不丢失整个磁盘和 win10 及其文件的情况下重新安装- 我将非常感激。

到目前为止我的方法:

这些是我来这里之前采取的步骤。使用实时安装:

通过擦除重新安装- 我已经阅读它可能会删除整个系统 -我没有走这条路。

所以我选择了“Something else” ——在图片中我的分区。

这是我唯一改变的东西 - 安装

最后是警告——这就是我发布这个问题的原因

为什么我担心: 有人对此提出了问题但没有得到实际答案: https ://github.com/mate-desktop/mate-desktop/issues/278

这是我担心的错误: https ://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/556373

据我了解,它可能会删除整个磁盘,不仅是我的 linux 系统和文件,还有我的 win10..

因为我读了一半猜想它可能源于家庭和根被连接我已经检查了我的使用df -h并猜猜是什么: 它们是

在继续之前:

 Is it really the source of the problem? or
is there something else I should do? maybe going on won't case any harm to my win10?


所以现在我试图将它们分开 - 我不知道我要去哪里。

我一直在按照本教程将我的家与我的根分开: https ://www.howtogeek.com/116742/how-to-create-a-separate-home-partition-after-installing-ubuntu/

这就是我陷入困境的地方,因为在创建新分区作为 /home 时,标签(或路径)是模棱两可的“新分区 #1”,我找不到如何将它放在路径中: 路径不明

我害怕进行更改,因为如果路径不明确,我怎么能继续到达这个在路径上无处可寻的主分区。

在夏天:

1)。如果您打算使用已创建的文件系统,请注意...

我们如何在重新安装时处理这种警告 - 不丢失数据,或者至少不丢失任何其他操作系统(如 win10)。

2)。如果实际上是通过将 home 与 root 分开(这只是我的猜测)如何在gparted新分区中创建路径(或标签)?

先谢谢了。

system-installation dual-boot partitioning 18.04 reinstall
  • 3 个回答
  • 1113 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve